Support Centre

Find articles, help and advice.

 
Welcome, Guest Login

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Using IssueSysAlert to create alerts

Ruben Tiago Mar 26, 2014 05:58PM UTC

Hi I'm trying to use the IssueSysAlert to create alerts, but some of the fields that I've parameter in lowercase, appear in uppercase in the Alertserver.

Command:
IssueSysAlert -originseverity '5' -object 'BBR2' -freetext 'Falha do Hearbeat BBR2' -gmenode 'BBR2' -domain 'uqc6001mon01' -objectClass 'numAlerts' -domainclass 'zOS' -objectstate 'UNAVAILABLE

Object in AlertServer:
UQC6001MON01_NUMALERTS_BBR2

Is it some configuration, that I can change?

Regards,
Ruben Tiago

7 Community Answers

Best Answer
Colin Griffiths Mar 27, 2014 11:33AM UTC

Hi Ruben,

Ah! That explains it :-).
Try....

code = popen('IssueSysAlert -originseverity 5 -object BBR2 -freetext Falha do Hearbeat BBR2 -gmenode BBR2 -domain uqc6001mon01 -objectClass numAlerts -domainclass zOS -objectstate UNAVAILABLE -debug')

Rexx interprets everything outside of quotes as a variable and variable not initialised is automatically initialised with a value of itself in upper case.

View in conversation


Up 0 rated Down
David Harwood Mar 27, 2014 10:00AM UTC Interlink Software Agent
Hi Ruben,

Is it only the Object field where the text is in uppercase?

What version of IssueSysAlert do you have? (IssueSysAlert -v)

Regards,
David
Up 1 rated Down
Colin Griffiths Mar 27, 2014 10:04AM UTC Interlink Software Agent
Hi Ruben,

Check if you have a $PPHOME/cfg/IssueSysAlert.cfg. There may be some logic in there converting to upper case or perhaps some CAF Global Logic.
What actually appears in $PPLOG/System_Log when you run the command - a new line should be added to it?
Up -2 rated Down
Ruben Tiago Mar 27, 2014 10:45AM UTC
Hi everybody,
So the IssueSysAlert version is 3.5.2 Date: 01/06/11 10:04:45.
Some other fiels also appear in Uppercase, like Freetext.
This is the message that appear in System_Log:
CEFVersion = CGDCEFV21 | ITMgmtProcess = Availability | OriginDateTime = 27/03/2014 10:32:09 | OriginKey = N/A | OriginSeverity = 5 | DomainClass = ZOS | Domain = UQC6001MON01 | ObjectClass = NUMALERTS | Object = BBR2 | ObjectState = UNAVAILABLE | FreeText = FALHA DO HEARBEAT BBR2 | Origin = IssueSysAlert | OriginEvtClass = System | OriginType = Binary | ObjectValue = N/A | gmenode = BBR2 | alertToken = N/A | parameterName = N/A | DescricaoCGD = N/A | LastOriginDateTime = N/A | zone = N/A | Service = N/A | Impact = N/A | Redundant = N/A | CASDIncidentArea = N/A | CASDImpact = N/A | CASDUrgency = N/A | CASDDescription = N/A | CASDTicket = N/A | CASDResolutionTeam = N/A | StateChange = N/A | LastOccurrence = N/A | InternalLast = N/A | Tally = N/A | CASDWeekday = N/A

The config file doens't have much information:
$ cat $PPHOME/cfg/IssueSysAlert.cfg
if ObjectClass = 'ppmd' & ObjectState = 'ENDED_OK' then OriginSeverity = 2

On CAF Global Logic we only have this information:
[Severity]
if wordpos(translate(OriginSeverity),'0 1 2 3 4 5 CLEAR INFORMATIONAL WARNING MINOR MAJOR CRITICAL') = 0 then OriginSeverity = translate(s_sev)

[Assignment]

[Timeout]
if gmenode = 'NoAlerts' then s_timeout = ObjectValue
[CloseAlerts]

[Concatenate]
Object = space(Domain) || "_" || space(ObjectClass) || "_" || space(Object)

Regards,
RT
Up 0 rated Down
Colin Griffiths Mar 27, 2014 11:03AM UTC Interlink Software Agent
Hi Ruben

I tried the same command here using IssueSysAlert 3.5.2 and got a different result:

IssueSysAlert -originseverity '5' -object 'BBR2' -freetext 'Falha do Hearbeat BBR2' -gmenode 'BBR2' -domain 'uqc6001mon01' -objectClass 'numAlerts' -domainclass 'zOS' -objectstate 'UNAVAILABLE'

CEFVersion = ISSCEFV15 | ITMgmtProcess = Availability | OriginDateTime = 27/03/2014 10:55:07 | OriginKey = N/A | OriginSeverity = 5 | DomainClass = zOS | Domain = uqc6001mon01 | ObjectClass = numAlerts | Object = BBR2 | ObjectState = UNAVAILABLE | FreeText = Falha do Hearbeat BBR2 | Origin = IssueSysAlert | OriginEvtClass = System | OriginType = Binary | ObjectValue = N/A | OrigObject = N/A | Text = N/A | qCurrQDepth = N/A | qThroughPut = N/A | qHighQDepth = N/A | qMgrName = N/A | ProblemId = N/A | MonitoringRuleId = N/A | ObjectName = N/A | ObjectAttribute = N/A | Parameter = N/A | ParameterValue = N/A | CL = N/A | nTimes = N/A | JobName = N/A | JobState = N/A | JobStartTime = N/A | CompletionTime = N/A

Could you try adding -debug as follows and then perform a cat $PPLOG/IssueSysAlert_Log

IssueSysAlert -originseverity '5' -object 'BBR2' -freetext 'Falha do Hearbeat BBR2' -gmenode 'BBR2' -domain 'uqc6001mon01' -objectClass 'numAlerts' -domainclass 'zOS' -objectstate 'UNAVAILABLE' -debug
Up 0 rated Down
Ruben Tiago Mar 27, 2014 11:28AM UTC
Hi Colin,
Here it is the result:
$ cat $PPLOG/IssueSysAlert_Log
20140327 11:23:10 IssueSysAlert Interlink Function Set Version 3.7.1b (3.5)
20140327 11:23:10 IssueSysAlert uni-REXX (R) Version 299
20140327 11:23:10 IssueSysAlert Open-REXX (TM) Copyright (C) iX Corporation 1989-2002. All rights reserved.
20140327 11:23:10 IssueSysAlert Passed Parameter: originseverity = '5'
20140327 11:23:10 IssueSysAlert Passed Parameter: object = 'BBR2'
20140327 11:23:10 IssueSysAlert Passed Parameter: freetext = 'FALHA DO HEARBEAT BBR2'
20140327 11:23:10 IssueSysAlert Passed Parameter: gmenode = 'BBR2'
20140327 11:23:10 IssueSysAlert Passed Parameter: domain = 'UQC6001MON01'
20140327 11:23:10 IssueSysAlert Passed Parameter: objectClass = 'NUMALERTS'
20140327 11:23:10 IssueSysAlert Passed Parameter: domainclass = 'ZOS'
20140327 11:23:10 IssueSysAlert Passed Parameter: objectstate = 'UNAVAILABLE'
20140327 11:23:10 IssueSysAlert Passed Parameter: debug = ''
20140327 11:23:10 IssueSysAlert Reading Configuration File /opt/ISS/POWERpack/cfg/IssueSysAlert.cfg
20140327 11:23:10 IssueSysAlert Read Completed
20140327 11:23:10 IssueSysAlert CEFVersion = CGDCEFV21 | ITMgmtProcess = Availability | OriginDateTime = 27/03/2014 11:23:10 | OriginKey = N/A | OriginSeverity = 5 | DomainClass = ZOS | Domain = UQC6001MON01 | ObjectClass = NUMALERTS | Object = BBR2 | ObjectState = UNAVAILABLE | FreeText = FALHA DO HEARBEAT BBR2 | Origin = IssueSysAlert | OriginEvtClass = System | OriginType = Binary | ObjectValue = N/A | gmenode = BBR2 | alertToken = N/A | parameterName = N/A | DescricaoCGD = N/A | LastOriginDateTime = N/A | zone = N/A | Service = N/A | Impact = N/A | Redundant = N/A | CASDIncidentArea = N/A | CASDImpact = N/A | CASDUrgency = N/A | CASDDescription = N/A | CASDTicket = N/A | CASDResolutionTeam = N/A | StateChange = N/A | LastOccurrence = N/A | InternalLast = N/A | Tally = N/A | CASDWeekday = N/A

I don't know if is importante or not but i'm running that command in a script:
#!/opt/ISS/bin/ISSrexx

dbhost = getenv('DBHOST')
dbuser = getenv('DBUSER')
dbpwd = iss_get_password(dbuser)
dbname = getenv('DBNAME')
server = getenv('DSQUERY')

DBHandle = iss_DBConn(dbhost,server,dbname,dbuser,dbpwd)
say DBHandle
if DBHandle < 0 then do
say 'Failure connecting to DB: 'dbhost server dbname
say 'Reason: 'ISSreturnCode DBreturnCode
exit 20
end
else do
say 'BES Database Connection Established'
end

sqlcmd = 'select DATEDIFF(minute,(select max(a.timeReceived) from ISS_PP_Alerts_Table a, ISS_PP_AlertField_Table b Where b.gmenode = "BBR1"
and a.alertId = b.alertId and a.mcname = "piPEMAO"),getdate()) as timechk'

rc = iss_DBQry(DBHandle,sqlcmd,'DBRes')
say DBRes.1.timechk
if DBRes.1.timechk > 1 then do
code = popen('IssueSysAlert -originseverity '5' -object 'BBR2' -freetext 'Falha do Hearbeat BBR2' -gmenode 'BBR2' -domain 'uqc6001mo
n01' -objectClass 'numAlerts' -domainclass 'zOS' -objectstate 'UNAVAILABLE' -debug')
if code < 0 then do
say 'Erro - Alert Creation Failed code='code 'ISSReturnCode='ISSReturnCode
exit code
end
end
Up 0 rated Down
Colin Griffiths Best Answer Mar 27, 2014 11:33AM UTC Interlink Software Agent
Hi Ruben,

Ah! That explains it :-).
Try....

code = popen('IssueSysAlert -originseverity 5 -object BBR2 -freetext Falha do Hearbeat BBR2 -gmenode BBR2 -domain uqc6001mon01 -objectClass numAlerts -domainclass zOS -objectstate UNAVAILABLE -debug')

Rexx interprets everything outside of quotes as a variable and variable not initialised is automatically initialised with a value of itself in upper case.
Up 0 rated Down
Ruben Tiago Mar 27, 2014 11:44AM UTC
Thanks Colin, it's working now.

Regards,
RT

This question has received the maximum number of answers.

Contact Us

desk.com@interlinksoftware.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete