Can NagiosXI send notification via FTP or other way?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Can NagiosXI send notification via FTP or other way?

Post by xpertech »

For some reasons and environment, if NagiosXI not allowed to send notification via Email or SMS, is there any other way to send notification? e.g. via FTP or file sharing.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Can NagiosXI send notification via FTP or other way?

Post by jdalrymple »

Notifications in Nagios are simply a command that runs at specific times.

You can definitely change that command, or even run multiple commands (on a per user basis). When configuring a contact in CCM note the configuration options host_notification_command and also service_notification_command. The commands themselves will have to be valid Nagios commands (also specified in CCM) but then they can be executed as an alternative to the default xi_notification_handler.
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: Can NagiosXI send notification via FTP or other way?

Post by mp4783 »

You can also write this as an event handler if that's easier. Just bundle up the the commands necessary to FTP your notification into a wrapper script and be sure it outputs an informative exit status.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Can NagiosXI send notification via FTP or other way?

Post by jdalrymple »

Just be aware event handlers are commands that happen at different times (more often) than notifications. The biggest difference being event handlers are executed in HARD->SOFT switches.
mp4783
Posts: 116
Joined: Wed May 14, 2014 11:11 am

Re: Can NagiosXI send notification via FTP or other way?

Post by mp4783 »

Agreed. You would essentially have to build the "when to notify" logic into the event handler itself and configure the service check appropriately.

For what it's worth, if you truly meant to ask what other ways can you use to be notified, then the answer is anything you can run at the command line.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can NagiosXI send notification via FTP or other way?

Post by tmcdonald »

All valid answers, but FTP notifications are definitely not built-in. We can help with getting the script into Nagios, but it is something you or your team would need to write.
Former Nagios employee
xpertech
Posts: 399
Joined: Thu Sep 01, 2011 9:47 pm

Re: Can NagiosXI send notification via FTP or other way?

Post by xpertech »

tmcdonald wrote:All valid answers, but FTP notifications are definitely not built-in. We can help with getting the script into Nagios, but it is something you or your team would need to write.
Thanks all the answers, would you kindly list the scripts (suppose a FTP account "user, pass" and sub-folder "nagios"), I wonder if the upload file can have a subject and body which like Email? this scripts should be write in event handler? how this event be executed?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Can NagiosXI send notification via FTP or other way?

Post by jdalrymple »

xpertech wrote:would you kindly list the scripts (suppose a FTP account "user, pass" and sub-folder "nagios")
As tmcdonald said nothing is built in. You would have to generate a script yourself in-house.
xpertech wrote:I wonder if the upload file can have a subject and body which like Email? this scripts should be write in event handler?
All of the requirements you asked for are very possible as all of those items are available via macros:
https://assets.nagios.com/downloads/nag ... olist.html
You can write the scripts in any language that your machine can interpret. Be aware it would be desirable to have it called with all the proper arguments from the Nagios process so that you don't have to generate the environmentals from macros. That process is very taxing on a system with many notifications.
Locked