Can NagiosXI send notification via FTP or other way?
Can NagiosXI send notification via FTP or other way?
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?
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.
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.
Re: Can NagiosXI send notification via FTP or other way?
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?
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.
Re: Can NagiosXI send notification via FTP or other way?
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.
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.
Re: Can NagiosXI send notification via FTP or other way?
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
Re: Can NagiosXI send notification via FTP or other way?
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?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.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Can NagiosXI send notification via FTP or other way?
As tmcdonald said nothing is built in. You would have to generate a script yourself in-house.xpertech wrote:would you kindly list the scripts (suppose a FTP account "user, pass" and sub-folder "nagios")
All of the requirements you asked for are very possible as all of those items are available via macros: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?
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.