The Message portion of the submission has multiple lines and may use the semi-colon character.
My code uses this syntax:
Code: Select all
#Create the completed syntax that will go to the Nagios Pipe
my $result = "PROCESS_SERVICE_CHECK_RESULT;$srce;$service;$state;$message\n";Code: Select all
$srce = "hostname.domain.com";
$service= "service_name";
$State = "2";
$message = "Message Text: MSGTXT: PR1X TWS - #J12345(AB_CDEFGHI_DATA) has abended
POC: POC48
Contact: Someone Somewhere; Someone Else; Maybe Thirdperson
Instructions: email [email protected]; [email protected]; [email protected]
Help text: A job has entered the ABEND state following the automatic recovery actions for the job. Contact the
schedule's owner to determine the appropriate action. Cancelling the abended job will permit other dependent
jobs and schedules to proceed. Rerunning an abended job will also work if the job finished successfully. The
operator action for this event will execute a conman rerun command on the job.";This is a sample of what I would like to send to the Nagios pipe. I would like the Nagios status in the display to be usable.
PROCESS_SERVICE_CHECK_RESULT;hostname.domain.com;service_name;2;Message Text: MSGTXT: PR1X TWS - #J12345(AB_CDEFGHI_DATA) has abended
POC: POC48
Contact: Someone Somewhere; Someone Else; Maybe Thirdperson
Instructions: email [email protected]; [email protected]; [email protected]
Help text: A job has entered the ABEND state following the automatic recovery actions for the job. Contact the
schedule's owner to determine the appropriate action. Cancelling the abended job will permit other dependent
jobs and schedules to proceed. Rerunning an abended job will also work if the job finished successfully. The
operator action for this event will execute a conman rerun command on the job.
The test is getting data from a log file, and also uses a csv file to look up and populate additional data. The csv file has 11,175 lines and the possibilities are too many to make a service for each. The log triggers an event multiple times a day.
I just need to get the test results into the Nagios Status information column and have the correct line breaks. It needs to be readable to the folks in our Data Center.
Ultimately, I need to pass all this data to a Ticketing System. Once the Nagios alert triggers, the communication to ticketing happens.
Any ideas?
Thanks
Steve B
P.S. I bet you are glad this is not a 5.5 upgrade issue...