Nagios Plugin for Cacti (NPC) 2.0.4

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Re: Hosts, Services, Service Problems - WORKING!

Post by divagater »

communIT wrote:Tailing the apache2 error logs for days revealed that NPC was looking for three tables:

npc_host_graphs
npc_service_graphs
npc_settings
I am glad you were able to solve this on your own. I am confused why you did not have the tables as they are supposed to be added by setup.php. I double checked that file and the table creation code for those tables is there.

Cheers,
Billy
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

bigrat wrote:Oooh sorry, this issue is caused by complex mysql password. I just simplify my password. It's OK now.
Looks like that has bitten a few people. Glad you got it resolved.

~Billy
rfrangie
Posts: 2
Joined: Tue Mar 31, 2009 5:38 pm

Wow!

Post by rfrangie »

This really has to be one of, if not, the best plugin I've seen for a very long time...

Well Done...

Quick Question... Is there a way to resize the portlets to show more info, or even remove the pagination and show all in the one page? I'm planning on putting this on a large screen/projector and would prefer to have all data on the one page/dashboard

Your help is appreciated

Cheers,
Ray.
big_z
Posts: 1
Joined: Mon Apr 06, 2009 3:42 pm

Additional PefData Character Removal

Post by big_z »

I echo others sentiments. Great plugin and thanks for all the work.

I've run into an issue stemming from using NSClient++ WMI queries where it appears to add ' marks around the performance remarks. I'm not a PHP guy by any stretch and was wondering if there is a quick replace code I could add to the results in perfdata.php that would strip the single quotes from the output? I saw someone had already gone this route to remove some additional spaces and didn't know if this may be a worthwhile path to pursue as well.

The reason I ask is that the tick marks are being replaced by spaces so I'm getting errors that the data is not properly formed.

Here is what I'm receiving from perfdata.php:
'20m':5% '10s':0% '4':1%

I've checked the Nagios service windows and the performance data looks exactly this way as well so it isn't caused by anything in NPC. I can check with the NSClient developer and see if it can be stripped from there, but not sure what downstream issues that would cause to others and think a replace on this side might cause the least impact. Open to suggestions, however....

Thanks.
Z

EDIT: I took a shot at some PHP with the help of GOOGLE and tossed in the line:
$output = preg_replace('/\'/', '', $output);
prior to the output and that seems to have removed the single quotes. I later realized that the %'s shown above were also causing issues so I added a second line to remove those.... Not sure if they can be combined on one line or not, but the two additional lines seem to have fixed the issue.

Hopefully someone else may find this useful if they are trying to integrate NSClient++ WMI data into Cacti.
sjordan
Posts: 16
Joined: Tue Mar 25, 2008 2:23 pm

Post by sjordan »

will this work with nagios 2.9?
myocella
Posts: 2
Joined: Mon Mar 30, 2009 1:50 am

Cacti keeps refreshing

Post by myocella »

Greeting

My Cacti keeps refreshing after I installed NPC plugin. Has anyone come across this before? How to fix this?

Cacti 0.8.7d
NPC 2.0.0b.166

Thank you
andrewh
Posts: 6
Joined: Wed Oct 17, 2007 10:07 am
Location: London

Tables creates as InnoDB, skipped by my install.

Post by andrewh »

Hi there, this plugin is great, I have everything installed but there's just one thing:

The tables are created as InnoDB so my installation of Cacti skips them. The tables are populated fine, but nothing is displayed in NPC.

I've run through setup again and changed the table definitions in setup.php to MyISAM, but I'd rather get to the bottom of it. I'm probably better off having all my tables in InnoDB right?

Really looking forward to using this plugin, thanks.
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

You can have mixed MyISAM and InnoDB in the same database. The InnoDB tables are required for NPC. That requirement actually comes from ndoutils/ndo2db and I have no control over it.

That said, the table type will not be the cause of you not seeing data in NPC. If there is no data than your httpd error log should be throwing a FATAL error. Please tail your httpd error log and then reload NPC. Look for any fatals and post here.

Cheers,
Billy
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

sjordan wrote:will this work with nagios 2.9?
Probably, but I haven't tried. Upgrading Nagios is pretty painless though.

Cheers,
Billy
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Re: Wow!

Post by divagater »

rfrangie wrote:This really has to be one of, if not, the best plugin I've seen for a very long time...

Well Done...

Quick Question... Is there a way to resize the portlets to show more info, or even remove the pagination and show all in the one page? I'm planning on putting this on a large screen/projector and would prefer to have all data on the one page/dashboard

Your help is appreciated

Cheers,
Ray.
Hi, sorry for slow response. The only way to currently resize the portlets is to minimize the left hand navigation panel. You do that by clicking the << just to the right of the Navigation heading. Hope that helps.

Cheers,
Billy
andrewh
Posts: 6
Joined: Wed Oct 17, 2007 10:07 am
Location: London

Post by andrewh »

divagater wrote:You can have mixed MyISAM and InnoDB in the same database. The InnoDB tables are required for NPC. That requirement actually comes from ndoutils/ndo2db and I have no control over it.

That said, the table type will not be the cause of you not seeing data in NPC. If there is no data than your httpd error log should be throwing a FATAL error. Please tail your httpd error log and then reload NPC. Look for any fatals and post here.

Cheers,
Billy
Thanks for getting back to me Billy.

I've set up NPC again with InnoDB tables, and I still get the same result. NPC is installed fine but has no data, when there is data in the database. In the apache error log, it just mentions not being able to find three image files - I think this is due to a typo of some sort:

Code: Select all

[Thu Apr 30 16:23:37 2009] [error] [client 10.0.0.1] File does not exist: /usr/share/cacti/images/tab_mode_tree<br , referer: http://cacti.domain.com/cacti/plugins/npc/npc.php
[Thu Apr 30 16:23:37 2009] [error] [client 10.0.0.1] File does not exist: /usr/share/cacti/images/tab_mode_list<br , referer: http://cacti.domain.com/cacti/plugins/npc/npc.php
[Thu Apr 30 16:23:37 2009] [error] [client 10.0.0.1] File does not exist: /usr/share/cacti/images/tab_mode_preview<br , referer: http://cacti.domain.com/cacti/plugins/npc/npc.php
In the Technical Support section of the System Utilites area, under MySQL Table Information, it lists all the MyISAM tables but then has

Code: Select all

The Following Tables were Skipped Due to being INNODB
and then lists all the npc_ tables. There's also some tables from mactrack here.

Not sure how to explain this...any help really appreciated.

Cheers,
Andrew
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

andrewh wrote:I've set up NPC again with InnoDB tables, and I still get the same result. NPC is installed fine but has no data, when there is data in the database.
Are you using Firefox or I.E.? I think IE is broken so probably only works with Firefox right now.

Next, if you do a:

Code: Select all

SELECT * from npc_hosts
Do you see that the npc_hosts table is populated?
andrewh
Posts: 6
Joined: Wed Oct 17, 2007 10:07 am
Location: London

Post by andrewh »

divagater wrote: Are you using Firefox or I.E.? I think IE is broken so probably only works with Firefox right now.
I was using Chrome initially but I've now switched to Firefox for working with NPC.
divagater wrote: Do you see that the npc_hosts table is populated?
Yes, absolutely. Just to give you an idea:

Code: Select all

mysql> select count(host_id) from npc_hosts;
+----------------+
| count(host_id) |
+----------------+
|            124 |
+----------------+
1 row in set (0.05 sec)
Thanks.
andrewh
Posts: 6
Joined: Wed Oct 17, 2007 10:07 am
Location: London

Post by andrewh »

andrewh wrote:
divagater wrote: Are you using Firefox or I.E.? I think IE is broken so probably only works with Firefox right now.
I was using Chrome initially but I've now switched to Firefox for working with NPC.
divagater wrote: Do you see that the npc_hosts table is populated?
Yes, absolutely. Just to give you an idea:

Code: Select all

mysql> select count(host_id) from npc_hosts;
+----------------+
| count(host_id) |
+----------------+
|            124 |
+----------------+
1 row in set (0.05 sec)
Thanks.
BUMP! Divagater, would really appreciate your input on this!
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

Hey Andrew. I sent you a PM on the second with my email address on the 2nd. As there will be a bit of back and forth to figure this out I wanted to take it to email. My email address is in the PM. Check it out and lets get you up and running.

Cheers,
Billy
[url=http://forums.cacti.net/viewtopic.php?t=26540][b]NPC 2.0.4[/b][/url]
[url=http://trac2.assembla.com/npc][size=75]Trac[/size][/url] | [url=http://trac2.assembla.com/npc/newticket?type=defect][size=75]Bugs[/size][/url] | [url=http://trac2.assembla.com/npc/newticket?type=enhancement][size=75]Requests[/size][/url]
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests