Page 1 of 1

show the text file in Nagios GUI

Posted: Sat Oct 13, 2018 1:34 pm
by bhaskarbabar
I have config backup of switch and want to show the same under nagios gui so that we can view while monitoring.

It should always pik up latest file available is it possible ?

Re: show the text file in Nagios GUI

Posted: Mon Oct 15, 2018 10:49 am
by cdienger
I'm not sure I fully understand the final goal, but if you're looking to host a config file that you download, you could save it to /usr/local/nagios/share/, and then view it by going to http://nagios_ip/nagios/<filename>. It should prompt you for nagios credentials. You can then make it easily accessible via the UI by editing /usr/local/nagios/share/side.php and inserting a link.

Re: show the text file in Nagios GUI

Posted: Thu Oct 18, 2018 1:07 pm
by bhaskarbabar
I am doing backup of cisco devices to nagios servers on weekly basis with script.

i want to show those back up files on nagios gui while monitoring cisco device like uptime , interface status ?

Re: show the text file in Nagios GUI

Posted: Thu Oct 18, 2018 4:46 pm
by npolovenko
@bhaskarbabar, One solution is to use a file count service check, that will check the number of files in the backup directory, or use a check that will alert you if the folder hasn't been modified in X amount of hours/days(we have these plugins on the nagios exchange). Otherwise, you could create your own custom script that would list all files in the backups directory:
#!/bin/bash

ls -l /path/to/backups/

exit 0