Hi Team,
This is my first question on forum. Just started working on Nagios and I want to change format of alert email to json format. Currently it is coming as plain text, Can anyone please help me to change text to json format as per below sample.
{
"nagios_alert": {
"server_name": "Nagios Master Production",
"app_name": " PEMS",
"service_name": " nscp",
"host": " localhost",
"state": " WARNING",
"last_state": " WARNING",
"check_attempt": " 4",
"max_check_attempt": "4",
"state_since": " 0d 0h 7m 0s",
"is_downtime": " 0",
"service_last_ok": "1551277516",
"service_check_output_short": " PROCS WARNING: 271 processes with STATE = RSZDT ",
"service_check_output_long": " ",
"notification_type": " PROBLEM",
"date_time": " Wed Feb 27 14:32:16 UTC 2019",
"additional_info": "PROCS WARNING: 271 processes with STATE = RSZDT"
}
}
Thanks in advance for the help
How to change nagios alert format into json format
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to change nagios alert format into json format
Closing this topic as it's a duplicate ( see this ).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!