Page 1 of 1
How To Send Nagios Alert To A Directory
Posted: Mon Oct 26, 2015 2:40 pm
by jh129666
Is there a way to send a nagios alert to a file in a directory on the nagios server?
Re: How To Send Nagios Alert To A Directory
Posted: Mon Oct 26, 2015 3:25 pm
by tmcdonald
You would need to create a new command that, instead of using sendmail (Core) or the built-in PHPMailer script (XI), would write files out to disk. Pretty easy to do if you know how to set up custom commands.
https://assets.nagios.com/downloads/nag ... ml#command
The above link is for the command syntax in Core, and the same thing basically is used in XI except instead of editing from the command line, you use the Core Config Manager. Once it is made you just add it as the notification command for a contact, and assign that contact to whatever host/service needs to have alerts written to disk.
Let me know if you have further questions!