|
|
| Author |
Message |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Mon Jul 28, 2008 5:04 am Post subject: |
|
|
| phalek wrote: | ok, Make sure you also included the additonal code which is mentioned in that doc.
Also, you'll need to have the "nmid" plugin installed, so you can then configure the devices in the "Configure Devices" section. See the image below. That's where you need to "add" devices to smokeping and select the appropriate server.
Once you've done that, there will be a file in the nmidSmokeping directory that contains the "Target" section for the smokeping config. You'll need to add that to your smokeping config, otherwise the CGI that comes with the smokeping plugin will not be able to find the correct smokeping images. |
Ok, I've followed the pdf and made the necessary changes to lib/html_tree.php and getSmokePingPath.pl. I'm now seeing the following in my Apache error_log
Service description 'http://xx.xx.xx.xx/cacti/plugins/nmidWebService/webservice.php?wsdl' can't be loaded: 501 Protocol scheme 'http' is not supported
Any ideas what this means?
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Mon Jul 28, 2008 9:56 am Post subject: |
|
|
Did you try to access the url using your browser ? It should display something like in the screenshot below. If not, then make sure you installed and activated "nmidWebService" and configured a password. The password needs to be the same as configured in the cgi script.
| Description: |
|
| Filesize: |
75.24 KB |
| Viewed: |
1188 Time(s) |

|
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Mon Jul 28, 2008 10:00 am Post subject: |
|
|
| phalek wrote: | | Did you try to access the url using your browser ? It should display something like in the screenshot below. If not, then make sure you installed and activated "nmidWebService" and configured a password. The password needs to be the same as configured in the cgi script. |
Yup
I get something similar when I access the page directly!
I've just noticed that a file called nmidSmokepingsmokeping_nmid_spserver1_config.txt has been created in the cacti plugins directory...
This seems to have some smoke config in that matches upto my graph tree!!
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Mon Jul 28, 2008 10:05 am Post subject: |
|
|
Yep, Smokeping has a target section which describes/creates the menu to the left of the smokeping website. The file you meantion is that target section. You'll need to add the entries there to your smokeping config.
Best thing would be to have a default smokeping config containing everything except the target section and then do something like:
| Code: |
cat template_smokepingconfig > smokeping_config
cat nmidSmokepingsmokeping_nmid_spserver1_config.txt >> smokeping_config
|
and then use smokeping_config as your config to start smokeping with.
you can see the smokeping menu and the cacti menu as some little screenshots here:
http://www.urban-software.de/fcaps/fault-management/nmid.html
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Mon Jul 28, 2008 10:13 am Post subject: |
|
|
| phalek wrote: | Yep, Smokeping has a target section which describes/creates the menu to the left of the smokeping website. The file you meantion is that target section. You'll need to add the entries there to your smokeping config.
Best thing would be to have a default smokeping config containing everything except the target section and then do something like:
| Code: |
cat template_smokepingconfig > smokeping_config
cat nmidSmokepingsmokeping_nmid_spserver1_config.txt >> smokeping_config
|
and then use smokeping_config as your config to start smokeping with.
you can see the smokeping menu and the cacti menu as some little screenshots here:
http://www.urban-software.de/fcaps/fault-management/nmid.html |
I take it I could cron those commands as a script to run say once an hour to automatically update my smokeping config file?
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Mon Jul 28, 2008 11:38 am Post subject: |
|
|
Sure you can do that, depending on how often you "add" devices to that file. I think you'll also need to restart/reload smokeping afterwards then to get it re-read the config file.
Did the smokeping graphs show up then ?
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Mon Jul 28, 2008 4:21 pm Post subject: |
|
|
| phalek wrote: | Sure you can do that, depending on how often you "add" devices to that file. I think you'll also need to restart/reload smokeping afterwards then to get it re-read the config file.
Did the smokeping graphs show up then ? |
Well, sort of. They show up fine on the smokeping website but within cacti I still get red crosses..
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Mon Jul 28, 2008 5:03 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Tue Jul 29, 2008 4:24 am Post subject: |
|
|
| 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  |
OK, when I do that I get an Internal Error page from Apache.
I checked the error.log file and see in there the following...
[Tue Jul 29 09:59:53 2008] [error] [client 10.170.24.206] Service description 'http://xx.xx.xx.xx/cacti/plugins/nmidWebService/webservice.php?wsdl' can't be loaded: 501 Protocol scheme 'http' is not supported, referer: http://xx.xx.xx.xx/cacti/graph_view.php?action=tree&tree_id=18&leaf_id=251
[Tue Jul 29 09:59:53 2008] [error] [client 10.170.24.206] Premature end of script headers: getSmokePingPath.pl, referer: http://xx.xx.xx.xx/cacti/graph_view.php?action=tree&tree_id=18&leaf_id=251
Any ideas??
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Tue Jul 29, 2008 3:26 pm Post subject: |
|
|
Hm ...
I can just post my configs here.
here's what I have put in my cgi script:
| Code: |
### START OF WEB SERVCE SETTINGS ###
my $webservice_password = 'test123';
my $webservice_url = 'http://cacti.urban-software.de/plugins/nmidWebService/webservice.php?wsdl';
my $tmp_dir = '/tmp/';
### END OF WEB SERVCE SETTINGS ###
|
test123 is the password I configured on the nmid config page.
The screenshot below shows what I did put in the smokeping section of the nmid config page.
The URL to the getSmokePingPath.pl should then be something like:
| Code: |
http://cacti.urban-software.de/cgi-bin/getSmokePingPath.pl?start=1217276624&end=1217363024&target=REGIONAL.Local_host&server=nmid_spserver1&graphtype=detail
|
which returns an image.
What smokeping version do you use ?
Would it be possible to get acces to your system to have a real-look at it ?
| Description: |
|
| Filesize: |
11.08 KB |
| Viewed: |
1106 Time(s) |

|
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Wed Jul 30, 2008 7:42 am Post subject: |
|
|
OK... I've solved the first problem... Bundle::LWP wasn't installed properly...
I'm now getting the error Can't locate SOAP/Lite.pm in @INC..
I've checked using CPAN and SOAP::Lite is installed and upto date...
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Wed Jul 30, 2008 4:05 pm Post subject: |
|
|
hm, ok
If it is installed ( perl -e "use SOAP::Lite" will throw no errors ) then you should do the following:
Try to find where SOAP/Lite.pm is installed and add the following line to the top of the cgi script:
| Code: |
use lib '/path/to/SOAPLiteMainDir';
|
E.g.:
If SOAP/Lite.pm is in /usr/lib/perl/site/lib/SOAP/Lite.pm then add the line
| Code: |
use lib '/usr/lib/perl/site/lib';
|
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Wed Jul 30, 2008 5:05 pm Post subject: |
|
|
| phalek wrote: | hm, ok
If it is installed ( perl -e "use SOAP::Lite" will throw no errors ) then you should do the following:
Try to find where SOAP/Lite.pm is installed and add the following line to the top of the cgi script:
| Code: |
use lib '/path/to/SOAPLiteMainDir';
|
E.g.:
If SOAP/Lite.pm is in /usr/lib/perl/site/lib/SOAP/Lite.pm then add the line
| Code: |
use lib '/usr/lib/perl/site/lib';
|
|
The test returned no error so I added the use line at the top of the getSmokePingPath.pl file but still got the same error!!
|
|
| Back to top |
|
 |
phalek Cacti User
Joined: 31 Jan 2008 Posts: 162 Location: Kressbronn, Germany
|
Posted: Wed Jul 30, 2008 5:19 pm Post subject: |
|
|
that's odd.
Did you try calling the cgi with
| Code: |
perl getSmokePingPath.pl
|
or just
| Code: |
./getSmokePingPath.pl
|
?
It might be a problem with the first 2 lines of script. it reads
| Code: |
#!"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")
|
|
| Back to top |
|
 |
msw1970 Cacti User
Joined: 09 Jan 2007 Posts: 153
|
Posted: Thu Jul 31, 2008 5:08 am Post subject: |
|
|
| phalek wrote: | that's odd.
Did you try calling the cgi with
| Code: |
perl getSmokePingPath.pl
|
or just
| Code: |
./getSmokePingPath.pl
|
?
It might be a problem with the first 2 lines of script. it reads
| Code: |
#!"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
|
|
| Back to top |
|
 |
|