Nagios Plugin for Cacti (NPC) Released

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Refreshing

Post by Smistir »

I have my retain_state set to 0 but everytime I do a restart then the setting gets put back to 1
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

Thats rather strange. If you are using fruity, make sure you sync the database to the file.

I have attached an updated extinfo.php that has the fix to allow you to map the host or service to a particular graph. I played with the query and got it to work. Though i dont think it should work the way i made it work, it does work. I am waiting for an email from Billy to confirm my findings.
Attachments
extinfo.zip
(6.68 KiB) Downloaded 469 times
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Post by Smistir »

I am not using Fruity... nor do I know what it is..

But the important this to know: Rather than do a complete re-install of nagios - I went and edited my /etc/nagios/nagios.cfg file and added the two lines for the event blocker. I also manually changed the retaining field to 0. I need to do some more testing to pinpoint when the issue is occuring .. but the end result is that I am getting a new nagios.cfg file that is replacing the modified version...

With the manual modifications everything is clean and straight forward.. but when it gets replaced is when I have issues.


_________________________________________

Am I also assuming that this plugin hasn't had the command drop down section functional?
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

are you doing updates from the nagios interface? Maybe there is a setting that is automatically set which is changing it.
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Post by Smistir »

for now.. everything seems fine.

I am not sure what caused it to update the config file but I have done everything that I could think of that might cause my issue. If it arises again then I will start digging more.. but for now I will assume it is fixed.
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Post by Smistir »

Let me know if you hear from Billy. I will wait to use your file after you get confirmation from him!
kwilsuzn
Posts: 1
Joined: Tue Jan 02, 2007 1:27 pm

Post by kwilsuzn »

Error when starting up nagios

Nagios 2.2 starting... (PID=5744)
initializing nagios-db mysql inserter...
Segmentation fault
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Post by Smistir »

Sounds like you are having the same problems that alot of people are having when doing the install..

Most of it is because of a lack of understanding ... I was/am in the same boat.

First, you need to run make on the inserter files from your 'install' directory. I couldn't find mine. Partly, because someone else did the initial install and left the rest to me to do the configs that were needed.

You'll have to look at all of the readme's for your system interpretation.. Ex. My directories are: /etc/nagios /usr/lib/nagios /usr/bin /usr/share/nagios

So, I had to do alot of modifying.

For my actual plugin install of NPC.. I had to re-download the installation. But I didn't reinstall. There are files in this that are needed. I put the inserter files in my /usr/lib/nagios/modules directory (mkdir on modules).

I couldn't tell you why this worked other than the fact that the files for nagios aren't needed after the install.
Smistir
Posts: 15
Joined: Wed Nov 08, 2006 9:34 am
Location: Florida

Post by Smistir »

Has anyone come up with a good plan for showing user specific information in NPC? I am guessing that NPC doesn't use any of the nagios configurations.

I am thinking that it might be possible to update all of the table fields and insert a 'user' field. Another possibility is to create a 'user' entity and tie it to the database so that when NPC queries the table a match can be made to the current logged in user and the associated tables that the user is able to view from the database.

Anyone else have some great ideas? Anyone come up with something that will keep me from having to do the modifications?

If I go and do this anyone want the update?
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

This just came from Billy(creator of NPC), regarding the SQL issue i was discussing. He has provided a final fix for it if you are using MYSQL 5.

While I was writing this I took a quick look at the query and immediatley see the problem. MySQL 5 is enforcing sql2003 standards now. So the join syntax in that query is what is failing. The fix is simple in that parentheses need to be added around the table names between FROM and LEFT JOIN. So the corrected query looks like:

SELECT graph_templates_graph.id, graph_templates_graph.local_graph_id, graph_templates_graph.height, graph_templates_graph.width, graph_templates_graph.title_cache as title, graph_templates.name, graph_local.host_id FROM (graph_local,graph_templates_graph) LEFT JOIN graph_templates on graph_local.graph_template_id=graph_templates.id WHERE graph_local.id=graph_templates_graph.local_graph_id AND graph_templates_graph.title_cache like '%' ORDER BY graph_templates_graph.title_cache,graph_local.host_id

The only difference is this part:

FROM (graph_local,graph_templates_graph) LEFT JOIN

The table names are surrounded by parentheses. There are probably other spots in the code where I use left joins without parentheses.

I hope this helps. If you get a chance please share this on the forums.

Cheers,
Billy
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

Post by icetoad »

I should mention there are two places in the file i submitted(or you can edit your own) where the query needs to be updated.
Quote from Bash.org: "I was once thrown out of barnes and noble for moving the bibles to the fiction section."
sheoncehadme
Posts: 1
Joined: Tue May 08, 2007 2:30 pm

Post by sheoncehadme »

In my experience with NPC, it worked well on the web front end, easy to modify and make work the way i want, the part that didnt work so hot was the event broker. it would double up entries and other wierd things.

With the advent of NDOUtils by the author of nagios, which does the same thing as the broker module (with added features), and you can retain service state, i have decided thats the way to go.

I will be re-writing all the sql queries and a few other things to go with the npc frontend. I figure i will post the update on here when i am done.
Mika2006
Cacti User
Posts: 178
Joined: Thu May 03, 2007 2:25 am

Post by Mika2006 »

where to find the release please?
and documentation
please?
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
Mika2006
Cacti User
Posts: 178
Joined: Thu May 03, 2007 2:25 am

Post by Mika2006 »

how to configure database?
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
Mika2006
Cacti User
Posts: 178
Joined: Thu May 03, 2007 2:25 am

Post by Mika2006 »

up
where the last version please?
|Cacti Version - 0.8.6j||Plugin Architecture - 1.1||Poller Type - CMD.php|
|os - Red hat 4es | |Web Server - Apache/2.0.52 (Red Hat)|
|PHP - 4.3.9| |MySQL - 4.1.20| |RRDTool - 1.2.13||SNMP - 5.1.2|
|Plugins| Host Info (hostinfo - v0.1)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests