How To Send Nagios Alert To A Directory

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

How To Send Nagios Alert To A Directory

Post by jh129666 »

Is there a way to send a nagios alert to a file in a directory on the nagios server?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How To Send Nagios Alert To A Directory

Post 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!
Former Nagios employee
Locked