Network Management Integration Plugin ( v0.3.9a Build 129 )

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
msw1970
Cacti User
Posts: 206
Joined: Tue Jan 09, 2007 8:28 am
Location: London, UK

Post by msw1970 »

phalek wrote:that's odd.

Did you try calling the cgi with

Code: Select all

perl getSmokePingPath.pl
or just

Code: Select all

./getSmokePingPath.pl

?
It might be a problem with the first 2 lines of script. it reads

Code: Select all

#!"D:\cacti_srv\perl-5-8-7.813\bin\perl.exe"
#!/usr/bin/perl
depending on the system you use, the very first line needs to point to your perl installation ("which perl")
Called it with ./getSmokePingPath.pl

I've removed the lines at the top that relate to a windows file patch and confirmed that my perl is in /usr/bin/

If I run it from the command line both ways return Content-type: image/png
User avatar
neovox
Cacti User
Posts: 52
Joined: Tue Jan 02, 2007 8:22 am
Location: MI

NMIDPhpip - Import Syntax

Post by neovox »

When using the import feature on NMIDPhpip, what is order of the fields for the import file? For instance.

IP;LOCATION;NOTES

OR

IP;MASK;DESCRIPTION;CLIENT;ETC


And should it be comma delimited or semicolon as shown in a previous post in this thread.

Thanks and great plug-in.

M
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

It is actually:

Code: Select all

IP;DESCRIPTION;CLIENT;NOTES
Nothing more, nothing less ...
User avatar
neovox
Cacti User
Posts: 52
Joined: Tue Jan 02, 2007 8:22 am
Location: MI

Post by neovox »

I'm having an issue where it seems the value for "IP RANGE" is not being set when a new CIDR is added. As a result no IP RANGE is displayed in the display.php output or appended to the url for the subnet. This causes an issues when using the Set Default feature, as the system doesn't have an iprange to reference.

I've been unable to determine where the system is inserting this value when the CIDR is added or where it's later is trying to reference it from. My table entries look pretty much the same for my 2 other CIDRs, where the IP RANGE is showing up.

Thanks.
Attachments
example.GIF
example.GIF (6.76 KiB) Viewed 5675 times
User avatar
neovox
Cacti User
Posts: 52
Joined: Tue Jan 02, 2007 8:22 am
Location: MI

Post by neovox »

ok. I think I figured this out, but phalek I'll need your input.

After a clean install of the plugin I added 3 CIDRs, two /24 and one /25. So far so good. I then added a /23. Once it added the CIDR, I added both /24 prefixes of the /23 as prompted. I deleted this /23 CIDR and added a different /26. At this point the IP RANGE entry (as shown in the previous graphic) was still showing up for the existing two /24 and the one /25, but not for the new /26.

The problem seems to be due to a mismatch between the NetID for this new subnet in the phpIP_addresses table and the AddressId in the phpIP_net_ips table. When a /23 is added the system assigns a separate AddressId to each /24 but only one NetID to the entire /23. As the two tables auto-increment going forward the NetID and AddressID for the newly entered subnets no longer match. The system can no longer find the IP RANGE for these networks and therefore cannot SET DEFAULTS. Once these values are off by one or more they continue to mismatch from that point on. If you manually set the AddressId to match the NetID it works as it should, but due to the auto-increment the next newly entered CIDR will be off again and need to be manually adjusted.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Nice :-)

I'm just wondering if those errors never occurred in the original phpIP tool ...

I'll have a look at this, but I guess I won't be able to until next week.
User avatar
neovox
Cacti User
Posts: 52
Joined: Tue Jan 02, 2007 8:22 am
Location: MI

Post by neovox »

cool. thanks for checkin' it out.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Hi neovox,

I think I found that error.

Can you change the following line (line 91) in get_data.php:

Code: Select all

$netAddress = db_fetch_cell("select netaddress from phpIP_net_ips where AddressId='".$leaf['NetID']."'");
to

Code: Select all

$netAddress = db_fetch_cell("select netaddress from phpIP_net_ips where NetCidr='".$leaf['NetID']."'");
that should actually fix it,, at least I hope :-)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

msw1970 wrote: Called it with ./getSmokePingPath.pl

I've removed the lines at the top that relate to a windows file patch and confirmed that my perl is in /usr/bin/

If I run it from the command line both ways return Content-type: image/png
That's fine then, the script just returns a png image.Did you get it up and running by now ?

Sorry for not answering for quite some time. I'm away from home during the week and just bought myself a Netbook (Acer Aspire One 150x) to get myself online again ...
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Uploaded a new build 126. It contains the following changes:

* nmidPhpip - fixed a bug preventing the correct settings of "default" values for subnets
* nmidNagiosPNP - added plugin to display Nagios PNP graphs within Cacti. The plugin behaves like the nmidSmokeping plugin.
User avatar
neovox
Cacti User
Posts: 52
Joined: Tue Jan 02, 2007 8:22 am
Location: MI

Post by neovox »

phalek,

Sorry for the delayed response. Looks like that mod worked to resolve my issue. Thanks again for looking into it.

Mike
msw1970
Cacti User
Posts: 206
Joined: Tue Jan 09, 2007 8:28 am
Location: London, UK

Post by msw1970 »

Hi

I'm having a bit of trouble with the TaskManager element of this plugin... Basically, I can add tasks from the main login screen but when I select the NMID TaskManager from the lefthand panel nothing appears and it seems there's no way of deleting tasks from the main screen!!
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Hi msw1970 !

Going to have a look at this I probably just forgot to add some links :-)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Hi msw1970

Did you add at least one group ?

Tasks can only be deleted via the "Manage Tasks" link in the NMID TaskMangaer section. But Tasks will only show up if at least one group is actually created.
frasketi
Posts: 12
Joined: Tue Sep 16, 2008 7:59 pm

Smokeping images not displaying inline

Post by frasketi »

I'm getting the same problems as above. My smokeping install is working, I have configured the cacti plugin. When I add a host to smokeping, I the graph is missing, but if I click on the magnifying glass, it takes me to the correct smokeping graph (within smokeping).

I'm stumped and frustrated, any help???

Here is the tail of /var/log/httpd/error_log which is interesting, but I have no idea where to proceed.

Code: Select all

[Tue Oct 21 11:03:44 2008] [error] [client xx.xx.xx.xx] (2)No such file or directory: exec of '/var/www/cgi-bin/getSmokePingPath.pl' failed, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37
[Tue Oct 21 11:03:44 2008] [error] [client xx.xx.xx.xx] Premature end of script headers: getSmokePingPath.pl, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37
[Tue Oct 21 11:03:53 2008] [error] [client xx.xx.xx.xx script not found or unable to stat: /var/www/cgi-bin/cropper, referer: http://xx.xx.xx.xx/cgi-bin/smokeping.cgi?target=External.Va
[Tue Oct 21 11:03:53 2008] [error] [client xx.xx.xx.xx] script not found or unable to stat: /var/www/cgi-bin/cropper, referer: http://xx.xx.xx.xx/cgi-bin/smokeping.cgi?target=External.Va
[Tue Oct 21 11:03:53 2008] [error] [client xx.xx.xx.xx] script not found or unable to stat: /var/www/cgi-bin/cropper, referer: http://xx.xx.xx.xx/cgi-bin/smokeping.cgi?target=External.Va
[Tue Oct 21 11:03:53 2008] [error] [client xx.xx.xx.xx] script not found or unable to stat: /var/www/cgi-bin/cropper, referer: http://xx.xx.xx.xx/cgi-bin/smokeping.cgi?target=External.Va
[Tue Oct 21 11:04:51 2008] [error] [client xx.xx.xx.xx] (2)No such file or directory: exec of '/var/www/cgi-bin/getSmokePingPath.pl' failed, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37
[Tue Oct 21 11:04:51 2008] [error] [client xx.xx.xx.xx] Premature end of script headers: getSmokePingPath.pl, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37
[Tue Oct 21 11:04:52 2008] [error] [client xx.xx.xx.xx] (2)No such file or directory: exec of '/var/www/cgi-bin/getSmokePingPath.pl' failed, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37
[Tue Oct 21 11:04:52 2008] [error] [client xx.xx.xx.xx] Premature end of script headers: getSmokePingPath.pl, referer: http://xx.xx.xx.xx/cacti2/graph_view.php?action=tree&tree_id=2&leaf_id=37

Thanks

phalek wrote:right click on the boxes, and copy the url to the image. Then paste that url into your browser and let it show up. It should bring back some more errors ... I hope :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests