Not able to Run the Plugin without the sudo Access

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Not able to Run the Plugin without the sudo Access

Postby amitgupta19 » Tue Feb 13, 2018 12:16 pm

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:

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?
Posts: 110
Joined: Fri Sep 08, 2017 5:53 am

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

Postby lmiltchev » Tue Feb 13, 2018 3:04 pm

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
QA Manager
Posts: 10304
Joined: Mon May 23, 2011 12:15 pm

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 16 guests