ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

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

Moderators: Developers, Moderators

Post Reply
TommyGun
Posts: 12
Joined: Mon Jul 11, 2011 8:08 am

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by TommyGun »

Can it be customized for custom ports?

http://forums.cacti.net/viewtopic.php?p=235624#p235624
Go3Team
Posts: 3
Joined: Thu Nov 22, 2012 6:05 am

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by Go3Team »

ILikeVoltron wrote:I'm having a problem where the graphs have 'm' which I assume stands for million behind most of them.

Cacti 0.8.7h, PHP 5.1.6, host side: Apache/2.2.15
The output of server-status?auto

Code: Select all

Total Accesses: 515
Total kBytes: 1156
CPULoad: .0384304
Uptime: 12360
ReqPerSec: .0416667
BytesPerSec: 95.7722
BytesPerReq: 2298.53
BusyWorkers: 1
IdleWorkers: 9
Scoreboard: ___...__....._.._..__.W.......................................................................................................................
........
Anybody have any idea what's wrong with this?

See attached

Code: Select all

/usr/bin/php -q ./ss_apache_stats.php dev-web1-ip-address hits
apache_total_hits:4564
Edit: Some more info

Code: Select all


06/07/2012 01:04:49 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/dev-web1_apache_cpuload_281.rrd --template apache_cpuload 1339092289:.0347801
06/07/2012 01:04:49 PM - CMDPHP: Poller[0] Host[23] DS[281] SERVER: /var/www/cacti/scripts/ss_apache_stats.php ss_apache_stats dev-web1.host.com cpuload, output: apache_cpuload:.0347801
06/07/2012 01:04:49 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/dev-web1_apache_total_hits_282.rrd --template apache_total_hits 1339092289:227
06/07/2012 01:04:49 PM - PHPSVR: Poller[0] DEBUG: PID[4848] CTR[8] INC: 'ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'dev-web1.host.com cpuload'
06/07/2012 01:04:49 PM - CMDPHP: Poller[0] Host[23] DS[282] SERVER: /var/www/cacti/scripts/ss_apache_stats.php ss_apache_stats dev-web1.host.com hits, output: apache_total_hits:227
06/07/2012 01:04:49 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/dev-web1_apache_total_kbytes_283.rrd --template apache_total_kbytes 1339092289:60
06/07/2012 01:04:49 PM - PHPSVR: Poller[0] DEBUG: PID[4848] CTR[7] INC: 'ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'dev-web1.host.com hits'
06/07/2012 01:04:49 PM - CMDPHP: Poller[0] Host[23] DS[283] SERVER: /var/www/cacti/scripts/ss_apache_stats.php ss_apache_stats dev-web1.host.com kbytes, output: apache_total_kbytes:60
06/07/2012 01:04:49 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/dev-web1_threadc_285.rrd --template thread_W:threadS:threadR:threadW:threadK:threadD:threadC:threadL:threadG:threadI 1339092289:5:0:0:1:0:0:0:0:0:0
06/07/2012 01:04:49 PM - PHPSVR: Poller[0] DEBUG: PID[4848] CTR[6] INC: 'ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'dev-web1.host.com kbytes'
06/07/2012 01:04:49 PM - CMDPHP: Poller[0] Host[23] DS[285] SERVER: /var/www/cacti/scripts/ss_apache_stats.php ss_apache_stats dev-web1.host.com threads, output: thread_W:5 threadS:0 threadR:0 threadW:1 threadK:0 threadD:0 threadC:0 threadL:0 threadG:0 threadI:0 thread_O:144
06/07/2012 01:04:49 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/dev-web1_apache_idle_workers_284.rrd --template apache_busy_workers:apache_idle_workers 1339092289:1:5
06/07/2012 01:04:49 PM - PHPSVR: Poller[0] DEBUG: PID[4848] CTR[5] INC: 'ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'dev-web1.host.com threads'
06/07/2012 01:04:49 PM - CMDPHP: Poller[0] Host[23] DS[284] SERVER: /var/www/cacti/scripts/ss_apache_stats.php ss_apache_stats dev-web1.host.com workers, output: apache_busy_workers:1 apache_idle_workers:5
06/07/2012 01:04:49 PM - PHPSVR: Poller[0] DEBUG: PID[4848] CTR[4] INC: 'ss_apache_stats.php' FUNC: 'ss_apache_stats' PARMS: 'dev-web1.host.com workers'
I'm having the same problem.
Image

Code: Select all

11/22/2012 06:10:01 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_apache_cpuload_25.rrd --template apache_cpuload 1353582601:.00181205
11/22/2012 06:10:01 AM - POLLER: Poller[0] Parsed MULTI output field 'apache_cpuload:.00181205' [map apache_cpuload->apache_cpuload] 

Code: Select all

Title:,"'Localhost
Vertical Label:,"'percent'"
Start Date:,"2012-11-22
End Date:,"2012-11-22
Step:,"300"
Total Rows:,"7"
Graph ID:,"22"
Host ID:,"1"

Date,"Apache
2012-11-22 05:45:00,"1.4624753667e-03","1.4624753667e-03","NaN"
2012-11-22 05:50:00,"1.4826113333e-03","1.4826113333e-03","NaN"
2012-11-22 05:55:00,"1.0263863667e-03","1.0263863667e-03","NaN"
2012-11-22 06:00:00,"1.3013652333e-03","1.3013652333e-03","NaN"
2012-11-22 06:05:00,"1.7654808667e-03","1.7654808667e-03","NaN"
2012-11-22 06:10:00,"1.8118999333e-03","1.8118999333e-03","NaN"
2012-11-22 06:15:00,"NaN","NaN","NaN"
It appears as though the result is being changed to a number such as 1.4624753667e-03
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by phalek »

As described here

http://docs.cacti.net/faq#what_does_u_m_p_etc_stand_for

m stands for "milli" like in milli seconds ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Go3Team
Posts: 3
Joined: Thu Nov 22, 2012 6:05 am

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by Go3Team »

phalek wrote:As described here

http://docs.cacti.net/faq#what_does_u_m_p_etc_stand_for

m stands for "milli" like in milli seconds ...
So hypothetically I could change the lower limit to something like .001 and not get the m.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by phalek »

You rather want to have this: http://docs.cacti.net/faq#show_exact_numbers

Something to play around with
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
hid3nax
Cacti User
Posts: 68
Joined: Thu Jan 12, 2012 7:48 am

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by hid3nax »

This script really needs a timeout value!

e.g. if you do this:

Code: Select all

php ss_apache_stats.php <a host which is down>
The script will hang for quite a long time. This shouldn't happen as sometimes it causes Cacti to misbehave.

Code: Select all

        $ctx = stream_context_create(array(
                'http' => array(
                'timeout' => 3
                )
            )
        );
        $url = "http://$host/server-status?auto";
        $result = file_get_contents($url, 0, $ctx);
        $array_result = array();
loweehahn
Posts: 2
Joined: Sun May 19, 2013 9:47 pm

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by loweehahn »

Can anyone tell me why the values in Hits / s are incrementing although I've set the data source type to "gauge". The other graphs work fine except for Hits / s. The server I'm monitoring is an internal server so DOS attack is very unlikely.
loweehahn
Posts: 2
Joined: Sun May 19, 2013 9:47 pm

Re:

Post by loweehahn »

RCK wrote:You know, I only take previous template and update the rrd processing :)
* Rolf Poser for apachestats 0.4 - http://forums.cacti.net/viewtopic.php?t=9861
* Mahuani for apachestats 0.6 SS - http://forums.cacti.net/viewtopic.php?t=17995

kbit/s title is from there, they should have a good reason for that :p

LOL !
I will try to monitor apache.org, just to see ;)
What do you mean by "update the rrd processing"?
skad233
Posts: 1
Joined: Wed Aug 21, 2013 3:09 pm

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by skad233 »

Hi .

I got some problems with ApacheStats..

MAX_OIDS is set on 1.

idea ?
08/21/2013 10:10:02 PM - SYSTEM STATS: Time:0.3674 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 10:10:02 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 10:05:01 PM - SYSTEM STATS: Time:0.3816 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 10:05:01 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 10:00:01 PM - SYSTEM STATS: Time:0.3621 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 10:00:01 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 09:55:02 PM - SYSTEM STATS: Time:0.3742 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 09:55:02 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 09:50:01 PM - SYSTEM STATS: Time:0.3852 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 09:50:01 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 09:45:02 PM - SYSTEM STATS: Time:0.3803 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 09:45:02 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 09:40:02 PM - SYSTEM STATS: Time:0.6608 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:12 RRDsProcessed:12
08/21/2013 09:40:02 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
08/21/2013 09:35:02 PM - SYSTEM STATS: Time:0.3725 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:12 RRDsProcessed:12
08/21/2013 09:35:02 PM - SPINE: Poller[0] Host[3] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
sharifu
Posts: 13
Joined: Mon Apr 16, 2012 10:08 am

Re: ApacheStats 0.81 with Manual Fixes - June 06, 2009

Post by sharifu »

spkane wrote:After trying to get these working and reading through all the posts, I though that I would upload an updated ZIP with all the files and various fixes, plus a very rough description of said fixes and how to apply them and get things configured correctly.

I hope it helps and will lead to a 0.82 in the near future that is better documented and a bit more usable out of the box.

Sean


I have imported this and noticed error messag eon top

Image
Eol
Posts: 44
Joined: Mon Apr 13, 2015 5:53 pm

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by Eol »

sharifu:

I think it's manual fix, see this post:

http://forums.cacti.net/about10417.html

It only goes up to 0.8.6g but I think you can just keep adding to it .. maybe look at a new template and pull the language out of there.
lmalossi
Posts: 1
Joined: Tue Mar 01, 2016 4:33 am

Re: ApacheStats 0.8.2 (multiple RRD, Low hdd, Script Server)

Post by lmalossi »

Hi all,
I have a strange graphing problem with apachestats:

even if php the php script executed by the poller gives more or less the same results:

Code: Select all

03/01/2016 02:30:04 AM - CMDPHP: Poller[0] Host[7] DS[37] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:4 apache_idle_workers:1020
03/01/2016 02:30:04 AM - CMDPHP: Poller[0] Host[7] DS[38] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:4 apache_idle_workers:1020
03/01/2016 02:30:04 AM - CMDPHP: Poller[0] Host[7] DS[39] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet threads, output: thread_W:1020 threadS:0 threadR:0 threadW:1 thre
adK:0 threadD:0 threadC:3 threadL:0 threadG:0 threadI:0 thread_O:15360
03/01/2016 02:35:04 AM - CMDPHP: Poller[0] Host[7] DS[37] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:3 apache_idle_workers:1021
03/01/2016 02:35:04 AM - CMDPHP: Poller[0] Host[7] DS[38] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:3 apache_idle_workers:1021
03/01/2016 02:35:04 AM - CMDPHP: Poller[0] Host[7] DS[39] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet threads, output: thread_W:1021 threadS:0 threadR:0 threadW:1 thre
adK:0 threadD:0 threadC:2 threadL:0 threadG:0 threadI:0 thread_O:15360
03/01/2016 02:40:03 AM - CMDPHP: Poller[0] Host[7] DS[37] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:44 apache_idle_workers:980
03/01/2016 02:40:03 AM - CMDPHP: Poller[0] Host[7] DS[38] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet workers, output: apache_busy_workers:44 apache_idle_workers:980
03/01/2016 02:40:04 AM - CMDPHP: Poller[0] Host[7] DS[39] SERVER: /srv/apache/cacti/htdocs/cacti/scripts/ss_apache_stats.php ss_apache_stats 02log009vq.hosts.eni.intranet threads, output: thread_W:980 threadS:0 threadR:0 threadW:1 threa
dK:20 threadD:0 threadC:23 threadL:0 threadG:0 threadI:0 thread_O:15360
cacti graphs in a strange way busy and idle threads: can you explain me why?
Apache threads graph
Apache threads graph
Immagine-20160301-1025-1.png (51.83 KiB) Viewed 2915 times
thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests