ApacheStats 0.6 (PHP Script Server Version)
Moderators: Developers, Moderators
ApacheStats 0.6 (PHP Script Server Version)
This is an update to the the popular apachestats script by Rolf Poser. I promised The Witness i would convert the perl script to a SS version (php), so here is is. I'm still in the process of learning PHP, so if anyone has any suggestions, comments, etc.. the are most welcome.
Here is I believe the latest thread on the original script
http://forums.cacti.net/viewtopic.php?t=9861
There is a host template for a 5 min poller and a 30 sec poller in the zip file.
Fixed the PHP4 problem. So the script SHOULD work on both PHP4 and PHP5. I've tested on my servers but anyone who is willing to test it out please let me know of any problems.
Here are some screenshots.
Here is I believe the latest thread on the original script
http://forums.cacti.net/viewtopic.php?t=9861
There is a host template for a 5 min poller and a 30 sec poller in the zip file.
Fixed the PHP4 problem. So the script SHOULD work on both PHP4 and PHP5. I've tested on my servers but anyone who is willing to test it out please let me know of any problems.
Here are some screenshots.
- Attachments
-
- ss_apache_stats.zip
- This version doesn't use cURL, so if you don't have it compiled into PHP use this version. This .zip file doesn't contain the host template, script only.
- (1.32 KiB) Downloaded 4261 times
-
- SS_Apache_Stats.zip
- ApacheStats 0.64. This version uses cURL so if you know you have it compiled into PHP use this version.
- (23.56 KiB) Downloaded 6649 times
Last edited by mahuani on Sun Dec 17, 2006 4:55 pm, edited 6 times in total.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Very Nice!!!
TheWitness
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?
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?
empty graphs
Hi!
Accidentally posted my question as a new topic:
[http://forums.cacti.net/viewtopic.php?t=18203]
Any help would be appreciated.
P.S: how can I contact a moderator to move my posting to this thread?[/url]
Accidentally posted my question as a new topic:
[http://forums.cacti.net/viewtopic.php?t=18203]
Any help would be appreciated.
P.S: how can I contact a moderator to move my posting to this thread?[/url]
What happens if you run the script from the script server on the command line?
See the documentation [Testing your Script in the Script Server]
See the documentation [Testing your Script in the Script Server]
Code: Select all
Testing Your Script in the Script Server
To test your script in the script server, simply follow the instructions below. When you have finished you testing, simply type "quit" <cr< at the Script Server command line to exit the script server.
1. Start the script server - You can do this by typing the following command:
shell> php <path_cacti>/script_server.php
NOTE: Due to a bug in Windows implementation of PHP, you must type the full path name to the script_server.php file.
2. Type in your command - Using the example from above, you would type in the following:
script server> <path_myfunction> my_function argument1 argument2 ...
In the Windows environment, your example could be the following:
script server> c:\wwwroot\cacti\scripts\ss_myfunction.php ss_myfunction localhost public 1 get duddle
3. If your function is operating properly, you should get a result.
4. To quit the script server, simply type "quit" <cr> at the command line.
NOTE: If there are errors in your script, you must restart the script server before your retest your code.
from the CLI it works:
[root@eunbrwi03c scripts]# php ./ss_apache_stats.php eunbrux09.eun.org
apache_total_hits:5465153 apache_total_kbytes:40996177 apache_cpuload:.196092 thread_W:14 threadS:0 threadR:0 threadW:4 threadK:28 threadD:0 threadC:0 threadL:0 threadG:9 threadI:0 thread_O:201[root@eunbrwi03c scripts]#
Who is online
Users browsing this forum: No registered users and 6 guests