Page 1 of 1

Not able to Run the Plugin without the sudo Access

Posted: Tue Feb 13, 2018 12:16 pm
by amitgupta19
I have the requirement to monitor the following:

1) Mount Points in a Linux machine.
2) Number of Files in a Folder.

I have downloaded the following 2 scripts from the Nagios Exchange:
1) check_mountpoints.sh
2) check_numoffiles.sh

But i am not getting the desired output as expected.

When i try to run these scripts manually, it is not giving the expected output and failing.

But when i run these scripts using the sudo then it is giving the expected result.

Our Client is not agreeing to give the sudo access to the "nagios" user.

Please suggest is there any way out?

Re: Not able to Run the Plugin without the sudo Access

Posted: Tue Feb 13, 2018 3:04 pm
by lmiltchev
To monitor some of the metrics, you do need sudo access... Having said that, you could probably use passive checks, e.g. via NRDP. Checks could be run, for example on a cron job by root (or user with sudo privileges), then the results could be sent to your nagios server. You will have to configure passive services manually on your Nagios Core server. It's easier in XI.

https://assets.nagios.com/downloads/nag ... erview.pdf

https://assets.nagios.com/downloads/nag ... ios-XI.pdf