vishwakarmak
asked on
Errpt and syslog
How do I configure for the errpt errors sent to syslog.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi again,
basically, you define en_method as a script of your own passing it some or all of the positional parameters -
en_method = "/path/to/my/script $1 $2 $3 $4 $5 $6 $7 $8 $9"
Your script can then use the suppled values at wish, e.g. react differently according to error classes ($3, can be (H)ardware or (S)oftware), or to resources (tapes, disks ... / rmt0, hdisk0 ...). One could also think of different reactions based on type ($4, e.g. INFO, PERM, TEMP, PERF, PEND ...).
Note that you can issue 'errpt -a -l $1' in your script, so you get the complete errpt entry and can parse it for additional info. Type 'errpt -a | more' to see what's interesting in there.
Instead of making selections in the script, you could also define several ODM errnotify entries, based on descriptors (basically the same as the parameters above, e.g. en_class, en_resource, en_rclass...) e.g.
errnotify:
en_name = "syslogH"
en_class = "H"
en_persistenceflg = 1
en_method = "/script/to/deal/with/hard ware/error s"
... or use logger as in the first suggestion and give it different facility.level settings, e.g.
errnotify:
en_name = "xxxx"
en_type = "PEND"
en_method = "logger -p local0.crit .............. "
errnotify:
en_name = " yyyy"
en_type = "TEMP"
en_method = "logger -p local1.info .............. "
We use the first method above (passing all parameters to the script) to send snmp traps to nagios.
HTH
wmp
basically, you define en_method as a script of your own passing it some or all of the positional parameters -
en_method = "/path/to/my/script $1 $2 $3 $4 $5 $6 $7 $8 $9"
Your script can then use the suppled values at wish, e.g. react differently according to error classes ($3, can be (H)ardware or (S)oftware), or to resources (tapes, disks ... / rmt0, hdisk0 ...). One could also think of different reactions based on type ($4, e.g. INFO, PERM, TEMP, PERF, PEND ...).
Note that you can issue 'errpt -a -l $1' in your script, so you get the complete errpt entry and can parse it for additional info. Type 'errpt -a | more' to see what's interesting in there.
Instead of making selections in the script, you could also define several ODM errnotify entries, based on descriptors (basically the same as the parameters above, e.g. en_class, en_resource, en_rclass...) e.g.
errnotify:
en_name = "syslogH"
en_class = "H"
en_persistenceflg = 1
en_method = "/script/to/deal/with/hard
... or use logger as in the first suggestion and give it different facility.level settings, e.g.
errnotify:
en_name = "xxxx"
en_type = "PEND"
en_method = "logger -p local0.crit .............. "
errnotify:
en_name = " yyyy"
en_type = "TEMP"
en_method = "logger -p local1.info .............. "
We use the first method above (passing all parameters to the script) to send snmp traps to nagios.
HTH
wmp
ASKER