Nagios Plugin for Cacti (NPC) 2.x - Preview

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

tumutbound
Posts: 2
Joined: Tue Nov 18, 2008 5:12 am

Re: n2c cant's see templates

Post by tumutbound »

labby wrote:
tumutbound wrote:I have everything installed and working (nagios, ndoutils, cacti) and I can see the hosts
in npc.
If I try to use n2c to import hosts, I can see the hostgroups but no templates are visible.
I'm assuming that the standard Cacti templates would be visible - or do I have to create my own?
Have you tried using Internet Explorer? I had issues with the N2C with chrome and Firefox 3, the one that worked best was IE8...
An arrow with a dropdown box should appear when you click under template next to a hostgroup...
No Windows machine on the network so no IE8 (lucky me!)
I can see the default Cacti templates in the Cacti Console, it's just under NPC I can't see any.
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Some issues with NPC and Nagios

Post by erickbe »

Hi,

I have Nagios 3.06, NDOutils 1.4b7, Cacti 0.87b, latest NPC working but have a few issues on NPC.

When I try to run a command on a host, I get this in a window that pops up. I have checked and the file is there and goes away when nagios is stopped and comes back. I have done a few google searches and found a few hits on this and the permissions, etc appear to be in line with those discussions I found but still have this issue.

/usr/local/nagios/var/rw/nagios.cmd does not exist.

Any ideas?

Also, when I use N2C to import hosts, I click on a hostgroup and select a template and the progress bar completes about importing 7 hosts but none are imported. The import results has no check marks or messages, just the host names on left column.

Another issue is the graphs in NPC, how does one map a graph from Cacti? I have set to Nagios host under the Cacti device and the graphs work in Cacti fine for the device. In NPC, I did view graph on some and map graph and the window for Map graph pops up and I select a graph template and that window doesn't go away and there is nothing displayed below the drop down. Then in NPC, that host gets a graph icon next to it and when I click on the graph it opens up a small empty window. See attached screenshot. Is the graph suppose to display in this window?
Attachments
npc.jpg
npc.jpg (79.85 KiB) Viewed 17246 times
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Re: Some issues with NPC and Nagios

Post by divagater »

erickbe wrote:When I try to run a command on a host, I get this in a window that pops up. I have checked and the file is there and goes away when nagios is stopped and comes back. I have done a few google searches and found a few hits on this and the permissions, etc appear to be in line with those discussions I found but still have this issue.

/usr/local/nagios/var/rw/nagios.cmd does not exist.
I think you said so but to be clear, does /usr/local/nagios/var/rw/nagios.cmd exist? If so do an ls -l on it and show me the full output? I am curious about the permissions, owner, and group on the file.
erickbe wrote: Also, when I use N2C to import hosts, I click on a hostgroup and select a template and the progress bar completes about importing 7 hosts but none are imported. The import results has no check marks or messages, just the host names on left column.
Go to Settings->NPC and set log level to Debug. The cacti log should be set to LOW so there is nopt to many logs to parse through. With NPC in Debug try to do another import, then shut off NPC Debug (dont forget to shut it off).

Also before doing the import get a tail going on your apache httpd logs. Look for any errors or fatals.

For your graph issue the graph is supposed to display in the popup window. Lets hit the first two issues above first then we can tackle this. As an FYI... Once I get done with the performance enhancements I am working on I am going to revisit importing and graphing.

Cheers,
Billy
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Re: Some issues with NPC and Nagios

Post by erickbe »

divagater wrote:
erickbe wrote:When I try to run a command on a host, I get this in a window that pops up. I have checked and the file is there and goes away when nagios is stopped and comes back. I have done a few google searches and found a few hits on this and the permissions, etc appear to be in line with those discussions I found but still have this issue.

/usr/local/nagios/var/rw/nagios.cmd does not exist.
I think you said so but to be clear, does /usr/local/nagios/var/rw/nagios.cmd exist? If so do an ls -l on it and show me the full output? I am curious about the permissions, owner, and group on the file.
The nagios user is in the nagios group. This is same user that html/http runs as as well as cacti.

Code: Select all

-rw-rw-r-- 1 nagios nagios      0 2009-02-04 00:00 ndomod.tmp

drwxrws--- 2 nagios nagios   4096 2009-02-04 00:00 rw

-rw-r--r-- 1 nagios nagios 105196 2009-02-04 00:00 objects.cache
-rw-r--r-- 1 nagios nagios      5 2009-02-04 00:00 nagios.lock
drwxrwxr-x 2 nagios nagios   4096 2009-02-05 00:00 archives
-rw------- 1 nagios nagios 160230 2009-02-05 15:00 retention.dat
-rw-rw-r-- 1 nagios nagios  12374 2009-02-05 15:00 nagios.log
-rw-rw-r-- 1 nagios nagios 161098 2009-02-05 15:20 status.dat


root@Box /usr/local/nagios/var$cd rw
root@Box /usr/local/nagios/var/rw$ls -lrt
total 0
prw-rw---- 1 nagios nagios 0 2009-02-04 00:00 nagios.cmd



The N2C part seems to be working fine since I updated to cacti .87c and PA for that update. I had posted this update in another posting the other day.

Thanks.
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

I did get the commands working from NPC today. Not sure what fixed it but it's working now. I basically added the web/cacti/nagios user to same group that had access to the command directory.
bigrat
Posts: 13
Joined: Wed Jun 11, 2008 3:12 am

Post by bigrat »

Thanks for the great plugin.

Does NPC send audio alert to web browser like Nagios?

Regards,

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

Post by divagater »

It doesn't. Did you use that feature? I wasn't sure if it was used or not and kinda forgot it was even there. If you want it I could probably make it a feature that can be enabled/disabled.

Billy
bigrat
Posts: 13
Joined: Wed Jun 11, 2008 3:12 am

Post by bigrat »

I greatly appreciate if you enable this feature in the next version of NPC.

Thanks

Bigrat
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Nagios Plugin for Cacti (NPC) 2.x - Preview

Post by gandalf »

divagater wrote:I have finally decided to rewrite NPC this time including all the features I want to see. It is not ready for an initial release yet but I wanted to show a few screenshots and list out some of the features to give an idea of the direction. One big change was to use ndo2db to handle inserting nagios events/objects into the database. This gets us away from the inserter module which is where most people had trouble.

I am very interested in suggestions so if you have an idea of what a Nagios and Cacti integration should be please share it in this thread and I will use this thread to give updates on the development status.

Features/goals:

* Nagios data is handled via ndo2db (written/maintained by Nagios team)
* A customizable dashboard view with various portlets to choose from
* Tabbed interface (EXT) with asynchronous data loads
* Must be a complete Nagios UI replacement (reports, maps, etc.)
* Must import (graph) Nagios performance data (semi-auto)
* Ability to link existing Cact service/host graphs to Nagios service/host
* Host and service level permissions configured similar to Cacti

A few screenshots are attached.


Cheers,
Billy
Thanks for posting this. We now encourage contributors to publish their work at the central cacti repository at http://docs.cacti.net/plugins
Reinhard
Demos
Posts: 1
Joined: Thu Apr 30, 2009 7:19 am

Post by Demos »

Hello,

I have a small question about the NPC plugin,

- I have Nagios 2.x installed on server, with ndomod plugin running.
- The ndomod information are save on a file
- I m have a script running on another server which scp the ndomod file and insert it into the cacti base with file2sock. Cacti also running on that server.

on the server running cacti I don't have acces to the nagios server, the only infos I have access are the ndo one.

I would like to use cacti to draw graph with ndo infos. I didnt find how to do it with npc yet :s

Is there any way to do that ?

At the moment I have graph for the local host, and NPC infos about nagios server (services/hosts status), of course I can't use remote command, but that not a problem, since I use cacti only for graph report.


NDOutils 1.4b7, Cacti 0.87b, latest NPC.
bousquet
Posts: 2
Joined: Thu Apr 30, 2009 10:27 am

Post by bousquet »

Hopefully, I have an easy issue to fix. I have followed the quick start to the point where I should see a tab labeled "NPC".

However, I don't see one. I only see "Console" & "Graphs".

I've tried uninstalling/reinstalling/disabling/reenabling, but I never see the new tab.

When I tried to manually goto it's URL (http://host/cacti/plugins/npc/npc.php) I get an "Access Denied" image with the text:
"You are not permitted to access this section of Cacti. If you feel that you need access to this particular section, please contact the Cacti administrator."

I even verified all files and folders are owned by the apache process owner (which is nagios, the same as Cacti) and have read permissions.

Did I miss something on the installation by chance?

Thanks,
Justin
aaronsegura
Posts: 25
Joined: Fri Jan 30, 2009 12:56 pm

Post by aaronsegura »

did you give yourself access to view the tab under User Permissions?
bousquet
Posts: 2
Joined: Thu Apr 30, 2009 10:27 am

Post by bousquet »

Thanks for the reminder! I actually did, but I converted over to using SSO with Web Basic authentication and the newly created users didn't get the permission. As soon as I checked the box, the tab populated!

FYI... I had problems using Groundworks VM appliance and PHP. Once I used the Yum installed PHP and added JSON module, it worked like a charm. If you have any problems, be sure to check your PHP logs.

Thanks again & Cheers!
Justin
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Re: Nagios Plugin for Cacti (NPC) 2.x - Preview

Post by divagater »

gandalf wrote:Thanks for posting this. We now encourage contributors to publish their work at the central cacti repository at http://docs.cacti.net/plugins
Reinhard
Thanks for the link Reinhard. I will get NPC posted there.

Cheers,
Billy
linebacker2
Posts: 28
Joined: Fri May 08, 2009 11:34 am

NPC Graphs not Working...

Post by linebacker2 »

Hi,

I have Nagios 3.06, NDOutils 1.4b7, Cacti 0.87b, latest NPC all working fine.

I can view/generate graphs for all nagios imported hosts from the GRAPHS tab but unable to make them work from the NPC tab.

In NPC, I did view graph or map graph and the window for Map graph pops up but no graph is displayed.

The npc host gets a graph icon next to it and when I click on the graph it opens up a small empty window.

After checking the /var/log/httpd/error_log

I see the following errors:

ERROR: opening '/usr/share/cacti/rra/web_server_01_traffic_in_9.rrd': No such file or directory
ERROR: opening '/usr/share/cacti/rra/web-server_01_users_37.rrd': No such file or directory

and the like for each graph I try and open from the NPC tab:

What can be the problem??????
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests