Bash script to plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Bash script to plugin

Post by kbauma01 »

Hey everyone,

I have a very basic bash script that checks if a file exists. When I run it on the command line, it works with no issues.

# ./check_file_exist.sh /junk
CRITICAL - /junk does not exist!

# ./check_file_exist.sh /var/log/messages
OK - /var/log/messages exists.

My question is how do I get that check working in XI? There are some servers that have to see that file and if it doesn't exist then alert us. I think there is documentation but my google-fu is not working well this morning!
snapier3
Posts: 144
Joined: Tue Apr 23, 2019 7:12 pm

Re: Bash script to plugin

Post by snapier3 »

You're almost there!

Read through the plugin development guidelines and I think you'll find what you're looking for...
https://nagios-plugins.org/doc/guidelines.html

Happy Monitoring,
--SN
Post Reply