REPAIRED: SmokePing Like 1.0

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
boots
Cacti User
Posts: 55
Joined: Wed Jan 07, 2004 4:59 am
Location: Melbourne Australia

Post by boots »

Hi guys,

Have you got this working in windows? I've tried Network - Ping and PING - Advanced Ping v1.2 data templates with no luck.

I've downloaded tping and fping and tried both, the results from the command line are;

C:\>php D:\Websites\stats.boots.no-ip.org\cacti/scripts/ss_fping.php ss_fping www.telstra.com.au 20
#!/usr/bin/php -q PHP Warning: call_user_func_array(): First argument is expected to be a valid callback, 'ss_tping' was given in D:\Websites\stats.boots.no-ip.org\cacti\scripts\ss_fping.php on line 16


C:\>php D:\Websites\stats.boots.no-ip.org\cacti/scripts/ss_tping.php ss_tping www.google.com.au
Windows Socket Unable to Resolve Host ss_tping
AV: PL:

however if I remove the ss_tping, I get a result but it still doesnt populate a graph.

C:\>php D:\Websites\stats.boots.no-ip.org\cacti/scripts/ss_tping.php www.google.com.au
AV:U PL:100
C:\>

Am I missing something here?

Thanks in advance

Boots
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try this instead:

php <path_cacti>/script_server.php

Once in the script server

<path_cacti>/scripts/ss_fping.php ss_fping www.google.au 20

Then you will get a response

quit

To exit the script server.

There is a but however that I will fix momentarily.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The original post now has the corrected ss_fping.php script. It should work fine on Windows.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

sorry to ask this. i've been out of the loop (browsing the forums) for a while and ss_tping is working perfectly for me. what's the problem with that ping script? thanks for the reply
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I used ss_tping to develop ss_fping after finding ss_fping returned more information. However, I left one code element from ss_tping in ss_fping.

Here is the repaired XML file for those who wish to stay with the perl based pinger.

TheWitness
Attachments
cacti_graph_template_smokepinglike_1_1.xml
(37.12 KiB) Downloaded 2536 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
ioiioi
Cacti User
Posts: 52
Joined: Mon Mar 28, 2005 8:57 am

Post by ioiioi »

spoonman wrote:I also would like to know has anyonehad problems importing these xml templates?? I get hash errors on 1.0 and the 1.1 templates...

I'm running .8.6d

Thanks
Now, I added an item "0.8.6f" => "0009" to this array,(config_arrays):
$hash_version_codes = array(
"0.8.4" => "0000",
"0.8.5" => "0001",
"0.8.5a" => "0002",
"0.8.6" => "0003",
"0.8.6a" => "0004",
"0.8.6b" => "0005",
"0.8.6c" => "0006",
"0.8.6d" => "0007",
"0.8.6e" => "0008"
);
and imported the dose12's original xml file, there is anther error happed
Error: XML: Generated with a newer version of Cacti.
how can I do to fixed this error?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you are running "d", then you really need to upgrade. This is especially true if you server is internet facing.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

Hi,
this is my first exprience with rrdtool and cacti, so its possible that i have made something wrong and now i am not able to make SmokePing to work ...
Problem is probably somewhere in ping, becouse if i tried TheWitness advice how to run ss_fping.php in command line i got this result:

Code: Select all

C:\>php c:\apache2\htdocs\cacti/script_server.php
PHP Script Server has Started - Parent is cmd
c:\apache2\htdocs\cacti/scripts/ss_fping.php ss_fping 192.168.1.1 20
#!/usr/bin/php -q
WARNING: Function does not exist
quit
PHP Script Server Shutdown request received, exiting
Can anybody help me and tell me what is wrong?

I am using:
Cacti 0.8.6f
MySQL 4.1.13a
PHP 5.1.0b3
Rrdtool 1.2.10
and its all under WinXP SP2 (Czech language) ...

All above software was installed step by step by the manual how to install Cacti under windows (not exactly, becouse some paths are different in current versions of software - but i hope that i change them right) ...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Do a CD into this directory before executing the script server and see if it makes a difference.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

I wasnt sure if you mean that i have to try it from directory cacti or cacti/scripts ... so i tried it from both but with the same result as you can see below ...

Code: Select all

C:\>cd c:\apache2\htdocs\cacti\scripts

C:\apache2\htdocs\cacti\scripts>php c:\apache2\htdocs\cacti\script_server.php
PHP Script Server has Started - Parent is cmd
c:\apache2\htdocs\cacti/scripts/ss_fping.php ss_fping 192.168.1.1 20
WARNING: Function does not exist
c:\apache2\htdocs\cacti/scripts/ss_host_cpu.php ss_host_cpu localhost public 2 1
61 500 get usage 0
U
quit
PHP Script Server Shutdown request received, exiting

C:\apache2\htdocs\cacti\scripts>cd ..

C:\apache2\htdocs\cacti>php c:\apache2\htdocs\cacti/script_server.php
PHP Script Server has Started - Parent is cmd
c:\apache2\htdocs\cacti/scripts/ss_fping.php ss_fping 192.168.1.1 20
WARNING: Function does not exist
c:\apache2\htdocs\cacti/scripts/ss_host_cpu.php ss_host_cpu localhost public 2 1
61 500 get usage 0
U
quit
PHP Script Server Shutdown request received, exiting
As you see i also try to run another script and it works (at least it does something, and give me some result - i dont know if result U is good or not, but its more then nothing - yes and i get this result independent on path from i run it, i get the same one if i run it directly from c:\>), so i probably made something wrog during installation of SmokePing script ... can you explain me what i have to exactly do to install and run some script (like a SmokePing) after installation of cacti? I probably made some mistake there ... thnx
Last edited by HappyCZ on Thu Aug 11, 2005 5:55 am, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Make sure you have the script from this post:

http://forums.cacti.net/viewtopic.php?t=8733

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

Thank you very much, i realy have some another version of ss_fping (with size 1438 bytes insted of 1455 bytes). After replacing i got respons times. Of course that i also have some wrong settings in cacti graphs but that i handeled to fix myself. Now it works as it should (or it looks like at least :D ). Once more thank you for your help.
HappyCZ
Posts: 6
Joined: Tue Aug 09, 2005 6:17 pm
Contact:

Post by HappyCZ »

Hi, i have one more question. When is poller run to start script and get data (so every five minutes) it pops up cmd.exe window for some second ... is there any way how to run it hide in background? Like this its a bit annoying when i am working an pc ...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Create a separate local account called "cactidemon". Assign it to the administrators group. Then, run your poller using that account and you will be all set.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest