Nagios Plugin for Cacti (NPC) Released

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
oldsk8trbabe
Posts: 14
Joined: Thu Aug 31, 2006 9:22 am

Nagios NPC for Cacti and state retention

Post by oldsk8trbabe »

Has anyone got a solution to the requirement that state retention be disabled in Nagios for this to work?

It's great but we do some pretty active configuration of Nagios so we are stopping and starting it a lot. Kind of a pain for everything to show pending after a restart.

Many thanks!!
farhan
Posts: 47
Joined: Sat Nov 12, 2005 6:55 am

Post by farhan »

I have been looking for this as well
fracrist
Posts: 3
Joined: Tue Oct 17, 2006 8:10 am

Is this a bug?

Post by fracrist »

Hi all,
I noticed that if a user hase console access denied but npc access enabled, the console tab pops up when accessing npc.

Is this a bug?

TIA,
fracrist.
fracrist
Posts: 3
Joined: Tue Oct 17, 2006 8:10 am

Re: Is this a bug?

Post by fracrist »

fracrist wrote:Hi all,
I noticed that if a user hase console access denied but npc access enabled, the console tab pops up when accessing npc.

Is this a bug?
I found a workaround for this bug.

In top_npc_header.php replace line 61 with this code:

Code: Select all

 
<?php if (sizeof(db_fetch_assoc("select realm_id from user_auth_realm where realm_id=8 and user_id=" . $_SESSION["sess_user_id"])) != 0): ?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php endif; ?>
<a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs.gif" alt="Console" align="absmiddle" border="0"></a><?php do_hook("top_header_tabs");?>
I've taken the query from include/top_graph_header.php .

HTH,
fracrist.
mcangeli
Posts: 1
Joined: Wed Oct 18, 2006 9:57 am

Post by mcangeli »

I installed nagios and nagios-devel on Fedora using yum.

Problem is I cannot find the nagios development files that I need to compile the insert.c file against.

Anyone have any ideas??
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Questions

Post by icetoad »

I got it working.. and its awesome.

Two problems:
1. Servicegroups.php and hostgroups.php are missing. Where can i get them?

2. On the extinfo.php page, when a host is selected, there is an option at the bottom to link a graph mapping, but the box just says none, even though i have created the device in cacti. Is there something i missing to get this linked?

3. On the same page there is a configure button at the top which goes to a hostconfig.php. Where can i get that file and what does it do?

Thanks!
tdjb
Posts: 18
Joined: Mon Oct 16, 2006 6:29 pm

Post by tdjb »

I've got two minor problems with our install of NPC.

1: the "view graphs" link (in NPC after you've clicked on a host) points to the wrong tree in Cacti. It always points to tree_id=1 but we need it to point to tree_id=2. Is this something on our end or has anyone else run into this?

2: When we enable NPC for users the Monitor tab gets added to their "view". So now when the login the Monitor tab shows up as well as NPC.

Thanks in advance for any suggestions.
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Re: Is this a bug?

Post by icetoad »

Thanks Fracrist! :)
fracrist wrote:
fracrist wrote:Hi all,
I noticed that if a user hase console access denied but npc access enabled, the console tab pops up when accessing npc.

Is this a bug?
I found a workaround for this bug.

In top_npc_header.php replace line 61 with this code:

Code: Select all

&nbsp;
<?php if (sizeof(db_fetch_assoc("select realm_id from user_auth_realm where realm_id=8 and user_id=" . $_SESSION["sess_user_id"])) != 0): ?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php endif; ?>
<a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs.gif" alt="Console" align="absmiddle" border="0"></a><?php do_hook("top_header_tabs");?>
I've taken the query from include/top_graph_header.php .

HTH,
fracrist.
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
chris.y2k.r1
Posts: 31
Joined: Tue Mar 07, 2006 11:39 pm

Thank You Thank You

Post by chris.y2k.r1 »

I just wanted to say Thank YOU!! What a great combination this is! We are going to take full advantage of this combined monitoring power.

I already have both Cacti and Nagios installed and running on a single machine. Can anyone point me in the direction of some general instructions for plugging Nagios into Cacti with NPC? I am assuming that is what NPC does.. right? Where are the install instructions?? I guess I should untar it and look at the README huh?

Thanks Again!!

Happy Chris :)
slander
Posts: 32
Joined: Thu Mar 16, 2006 12:01 pm

Re: Nagios NPC for Cacti and state retention

Post by slander »

oldsk8trbabe wrote:Has anyone got a solution to the requirement that state retention be disabled in Nagios for this to work?

It's great but we do some pretty active configuration of Nagios so we are stopping and starting it a lot. Kind of a pain for everything to show pending after a restart.

Many thanks!!
Not a solution - but - I have noticed that the ndoutils, which also log nagios state to a database, do not require this. So - it seems like if someone has the time, rewriting this to take advantage of ndoutils would be a win. Also, that would make it nagios 3.0 ready.
masterj
Posts: 6
Joined: Mon Dec 05, 2005 7:15 am
Location: Norway

Post by masterj »

Any solution for the retain_state_information yet ??

I would love to retain the state of my hosts during a restart :)
Jo Christian Buvarp
JonathanC
Posts: 7
Joined: Tue Feb 07, 2006 1:15 pm

Re: Questions

Post by JonathanC »

icetoad wrote:I got it working.. and its awesome.

Two problems:
1. Servicegroups.php and hostgroups.php are missing. Where can i get them?

2. On the extinfo.php page, when a host is selected, there is an option at the bottom to link a graph mapping, but the box just says none, even though i have created the device in cacti. Is there something i missing to get this linked?

3. On the same page there is a configure button at the top which goes to a hostconfig.php. Where can i get that file and what does it do?

Thanks!
Has anyone found any information on problem 1? I love this plugin, that is the only issue with it...

Thank you...
slander
Posts: 32
Joined: Thu Mar 16, 2006 12:01 pm

Missing files never existed

Post by slander »

If you go back thru this entire subject (it's only 9 pages :D ) you will see that Divagator never wrote them. Also, it seems he has abandoned this project, so unless someone else wants to write them, they just won't be there.

On question number 2, I never got that to work either, but I think others did - so I guess we are doing something wrong! If you ever figure it out, let me know - I don't use that feature anyways, bit I have often wondered about it
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Refreshing

Post by Smistir »

It seems as though nobody is working on this post string anymore.. I hope someone is checking..

The answer may already be on this post, but then again it is 9 pages long.

I am noticing that the NPC plugin is not refreshing quite as often as Nagios itself. I am still in Testing with this plugin and I haven't seen all of the quirks yet. I have a high demand for alot of refreshing for the most up-to-date stats on our systems. Has anyone come across this problem and found a work-able solution?
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

The issue with problem 2 was an SQL query. I have the newest MySQL 5 running and the query is only compatible with the the previous version 4.

He said he was going to work on it, but i havent heard back from him. I will send him another email and ask. He sounds like a busy guy, so i dont want to badger him.

As far as refreshing goes, i didnt notice any lag time, but that could just be because its on the same server.

Did you set it to not retain state when restarted?
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests