-
Can you trigger alerts of generic_data_string modules
I am just starting to get Pandora 2.0 configured and setting up some basic alerts.
The Min value and Max value seem to require your module return a numeric value in order to trigger the alert(ex. generic_data). Is there a way to trigger an alert that also contains the text output from the commands being run(ex. generic_data_string)?
I can get this alert to trigger for an agent.
module_begin
module_name SAP_Disk_95
module_type generic_data
module_exec df -Ph |egrep ‘9[5-9]%|100%’ |wc -l |awk -F” ” ‘{print $1}’
module_description Check for disks over 94% full
module_endI have setup an alert for this that tells me there is an agent that I need to check that has a disk that is close to full.
min 0 ## Send an alert if there are any number of file systems
max 0 ## over 94% full.
_field1_ [email protected]
_field2_ _agent_::SAP_Disk_95::Critical
_field3_ There are _data_ disk(s) on host _agent_ are over 94% full. Please check.This will tell me the number of disks that are over 94% full. Is there also a way to include the name of the file systems?
What I would like is to have a module that does:
module_begin
module_name SAP_Disk_95_names
module_type generic_data_string
module_exec df -Ph |egrep ‘9[5-9]%|100%’
module_description List the disks over 94% full
module_endI can get this to work and it will return an entry of:
ussp-sap1:/vol/SAP/dvd/sapmedia 700G 663G 38G 98% /sapmedia
What I would like to do is to trigger an alert that tells me:
min ?? ## I’m not sure if I can even trigger an alert of a text value.
max ?? ## I’m not sure if I can even trigger an alert of a text value.
_field1_ [email protected]
_field2_ _agent_::SAP_Disk_95::Critical
_field3_ The following disk(s) on host _agent_ are over 94% full. _data_ Please check.This way I know what disks to go out and check. The /sapmedia getting full just means somone is installing and not cleaning up their files. ie. don’t worry and go back to bed. However if a sapdata or log file system gets full it means log in and get it fixed before anything fails.
I am going through the documentation. I haven’t found anything yet that talks about sending an alert for a module that is of type “generic_data_string”. I still have a *lot* of the documentation to go through and a lot of threads on the wiki to go through. Maybe I need to be looking at plugins or WMI or SNMP. This is a very cool product, but I have a lot more to read.