Dibbler's Net

Monday, August 04, 2008

Read Only CGI Patch for Nagios 3.0.3 Updated

For many many version now I have maintained a patch for Nagios called the Read Only Patch. I have found in most cases that when I have a Nagios install I have some type of external user involved. Nagios is a great tool for showing what’s working and not just what’s wrong. But in order to allow external users to see what’s working they need an account. And with that account there are all sorts of commands they can run or comments they can see. This patch removes that ability for selected users. It also removes comments as in most Nagios installs I leave the comments as a way for techs to relay information regarding a system and that information is not always meant for external view. If you have any questions please feel free to comment or ask them on the Nagios-Devel Mailing list.


Download the tar file.

# READONLY Patch for Nagios 3.0.3 Derrick Bennett Aug 4, 2008

This patch will provide for a new option in cgi.cfg



Any Nagios userid listed in the above cgi variable will be limited to Read only CGI Access.
This will block any service or host commands normally shown on the extinfo pages.
This will also block any service or host based comments from being shown to read only users.

As shown below instead of seeing the commands or comments they get a notice that commands are not available and comments just don’t show up at all.


Posted by derrick in • BloggingNagios
(1) Comments | Permalink
Next entry: "Clear" Program loses data Previous entry: SlingBox Solo FTW
.(JavaScript must be enabled to view this email address) on 10/12 at 08:18 AM

Great work this is what I am looking for after getting a call from GM that we have to provide nagios access to outside customer.

Today I was trying to patch nagios-3.2.0 but it was failing with message

Reversed (or previously applied) patch detected!  Assume -R? [n]

Then I added the “authorized_for_read_only=” to cfg.cfg and nagios -v /etc/nagios/nagios.cfg didn’t complain and WOW when i logged in with read only user it do not have any option to execute any command smile

This is what I see for host from nagios Web UI.

“Your account does not have permissions to execute commands”

Wonders when they have added your patch to nagios core?

Page 1 of 1 pages

Post a comment






Remember my personal information

Notify me of follow-up comments?

Submit the word you see below: