|
|
| Author |
Message |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
|
| Back to top |
|
 |
boots
Joined: 07 Jan 2004 Posts: 49 Location: Melbourne Australia
|
Posted: Wed Aug 03, 2005 6:26 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Aug 03, 2005 6:35 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Aug 03, 2005 6:40 am Post subject: |
|
|
The original post now has the corrected ss_fping.php script. It should work fine on Windows.
TheWitness
|
|
| Back to top |
|
 |
flipflap Cacti User
Joined: 09 Jul 2005 Posts: 137
|
Posted: Wed Aug 03, 2005 6:45 am Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Aug 03, 2005 8:53 pm Post subject: |
|
|
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
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_smokepinglike_1_1.xml |
| Filesize: |
37.12 KB |
| Downloaded: |
1474 Time(s) |
|
|
| Back to top |
|
 |
ioiioi Cacti User
Joined: 28 Mar 2005 Posts: 51
|
Posted: Thu Aug 04, 2005 5:28 am Post subject: |
|
|
| 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?
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Thu Aug 04, 2005 6:33 pm Post subject: |
|
|
If you are running "d", then you really need to upgrade. This is especially true if you server is internet facing.
Larry
|
|
| Back to top |
|
 |
HappyCZ
Joined: 09 Aug 2005 Posts: 6
|
Posted: Tue Aug 09, 2005 6:38 pm Post subject: |
|
|
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: | 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) ...
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Tue Aug 09, 2005 7:22 pm Post subject: |
|
|
Do a CD into this directory before executing the script server and see if it makes a difference.
TheWitness
|
|
| Back to top |
|
 |
HappyCZ
Joined: 09 Aug 2005 Posts: 6
|
Posted: Wed Aug 10, 2005 4:56 am Post subject: |
|
|
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: | 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 |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
|
| Back to top |
|
 |
HappyCZ
Joined: 09 Aug 2005 Posts: 6
|
Posted: Thu Aug 11, 2005 6:03 am Post subject: |
|
|
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 ). Once more thank you for your help.
|
|
| Back to top |
|
 |
HappyCZ
Joined: 09 Aug 2005 Posts: 6
|
Posted: Fri Aug 12, 2005 6:46 am Post subject: |
|
|
| 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 ...
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Fri Aug 12, 2005 3:03 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
|