Hello,
I've read through much of the documentation and I'm at a point where I need some help from a professional.
So here's the issue. Say you had the same mount on a handful of servers, we can call it /cheese. When I do the mount check in the XI wizard, this service is unable to be ran on more than one server and is configured to the initial server you run the wizard on. How can I make a single service that will monitor /cheese and see if /cheese is hanging and add it to an entire group of servers.
I don't want to have 10 servers in a group and have 10 of the same services to check for the /cheese mount.
Thank you
One service to monitor df on multiple hosts
Re: One service to monitor df on multiple hosts
The "Mountpoint" wizard currently only supports monitoring mountpoints on the server the plugin is run on. If you go thru the wizard, it sets up a service that monitors a local mountpoint on the Nagios XI machine, but adds it as a service attached to the host you give it. Not too useful if you ask me.
Are you currently running NCPA on any of these servers?
I ask because we can use some trickery to ask NCPA to execute the "check_mountpoints.sh" script on the remote server (the one that ships with Nagios XI, and checks local mountpoints). See Using Scripts / Plugins With NCPA.
If you've done all that and have the check actually working on the remote, let me know and I'll help you apply it to a range of servers.
Are you currently running NCPA on any of these servers?
I ask because we can use some trickery to ask NCPA to execute the "check_mountpoints.sh" script on the remote server (the one that ships with Nagios XI, and checks local mountpoints). See Using Scripts / Plugins With NCPA.
If you've done all that and have the check actually working on the remote, let me know and I'll help you apply it to a range of servers.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: One service to monitor df on multiple hosts
We do plan on using NCPA very soon.
Re: One service to monitor df on multiple hosts
What you would do for each host is upload check_mountpoints.sh into /usr/local/ncpa/plugins/, set it as executable, call it using this as an example:
NCPA also has some built-in checks for mount points that will give even better data, such as free space.
Code: Select all
Command name: check_xi_ncpa
Command : $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
ARG1 : -t 'mytoken' -P 5693 -M 'plugins/check_mountpoints.sh' -q 'args=/path/to/mountpoint -i -w'
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: One service to monitor df on multiple hosts
I will consider this. The default wizard for mount points has caused us some issues and your option may be better.
Re: One service to monitor df on multiple hosts
dchurch wrote:What you would do for each host is upload check_mountpoints.sh into /usr/local/ncpa/plugins/, set it as executable, call it using this as an example:NCPA also has some built-in checks for mount points that will give even better data, such as free space.Code: Select all
Command name: check_xi_ncpa Command : $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$ ARG1 : -t 'mytoken' -P 5693 -M 'plugins/check_mountpoints.sh' -q 'args=/path/to/mountpoint -i -w'
When I run the above check with the correct token and mount point for this server I get the response "nagios utils.sh not found"
Re: One service to monitor df on multiple hosts
Copy /usr/local/nagios/libexec/utils.sh onto the remote server as /opt/nagios/plugins/utils.sh and it should work.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: One service to monitor df on multiple hosts
That location for utils.sh did not work; however, when I created and put the utils.sh file into /opt/nagios/libexec, it did work. After digging through the mount check plugin I see that the plugin is looking for the utils.sh script in the below locations:
/opt/nagios/libexec
/usr/lib64/nagios/plugins
/usr/lib/nagios/plugins
/usr/local/nagios/libexec
/usr/local/icinga/libexec
/usr/local/libexec
/opt/csw/libexec/nagios-plugins
So I can put the utils.sh file in any of these or append the script the look in any directory I want. FYI I just unmounted a directory and received a failed message, it works perfect!
Thank you for your help!
/opt/nagios/libexec
/usr/lib64/nagios/plugins
/usr/lib/nagios/plugins
/usr/local/nagios/libexec
/usr/local/icinga/libexec
/usr/local/libexec
/opt/csw/libexec/nagios-plugins
So I can put the utils.sh file in any of these or append the script the look in any directory I want. FYI I just unmounted a directory and received a failed message, it works perfect!
Thank you for your help!
Re: One service to monitor df on multiple hosts
Glad to hear you resolved it! Locking thread.
If you have any additional issues, feel free to make a new thread.
If you have any additional issues, feel free to make a new thread.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.