Not able to Run the Plugin without the sudo Access

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Not able to Run the Plugin without the sudo Access

Post 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?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked