[XML] successor to apachestats 0.4
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 85
- Joined: Sat Jan 22, 2005 4:51 pm
Use of uninitialized value in concatenation
Hi Guys,
I have installed template on a new Fedora Core 4 machine and got the following errors when running the script:
[root@proxy scripts]# perl ws_apachestats.pl www.mymachine.com
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 69.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 71.
Use of uninitialized value in split at ws_apachestats.pl line 91.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 105.
apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers: apache_reqs_second: thread_O:0 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:0 thread_W:0 apache_cpuload:
[root@proxy scripts]#
Error is happening from console with root and with cacti user as well, the user i run cacti processes.
Strange is that I have this script running on some Red Hat 9 machines and got no errors at all.
Is this a new check from newer Perl versions ???
I have installed template on a new Fedora Core 4 machine and got the following errors when running the script:
[root@proxy scripts]# perl ws_apachestats.pl www.mymachine.com
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 69.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 71.
Use of uninitialized value in split at ws_apachestats.pl line 91.
Use of uninitialized value in concatenation (.) or string at ws_apachestats.pl line 105.
apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers: apache_reqs_second: thread_O:0 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:0 thread_W:0 apache_cpuload:
[root@proxy scripts]#
Error is happening from console with root and with cacti user as well, the user i run cacti processes.
Strange is that I have this script running on some Red Hat 9 machines and got no errors at all.
Is this a new check from newer Perl versions ???
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please tell us what your browser returns when entering www.mymachine.com/server-status?auto as URL. The script awaits some output like Please note the apache version
Reinhard
Code: Select all
$output =~ /Total Accesses: (.*)/;
$out .= "apache_total_hits:".$1." ";
$output =~ /Total kBytes: (.*)/;
$out .= "apache_total_kbytes:".$1." ";
$output =~ /Busy.*: (.*)/;
$out .= "apache_busy_workers:".$1." ";
$output =~ /Idle.*: (.*)/;
$out .= "apache_idle_workers:".$1." ";
Reinhard
-
- Cacti User
- Posts: 85
- Joined: Sat Jan 22, 2005 4:51 pm
does that pl script work under windows ?
I run it manually at command line and I got
perl G:/root/web/cacti/scripts/ws_apachestats.pl 192.168.1.20
The system cannot find the path specified.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 69.
Use of uninitialized value in split at G:/root/web/cacti/scripts/ws_apachestats.pl line 89.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 103.
apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers: thread_O:0 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:0 thread_W:0 apache_cpuload:
I compare the new script with original one and found new script actually use high speed version which use wget or lynx which I don't have on my windows box, what I can do now?
I run it manually at command line and I got
perl G:/root/web/cacti/scripts/ws_apachestats.pl 192.168.1.20
The system cannot find the path specified.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 63.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 65.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 67.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 69.
Use of uninitialized value in split at G:/root/web/cacti/scripts/ws_apachestats.pl line 89.
Use of uninitialized value in concatenation (.) or string at G:/root/web/cacti/scripts/ws_apachestats.pl line 103.
apache_total_hits: apache_total_kbytes: apache_busy_workers: apache_idle_workers: thread_O:0 threadC:0 threadD:0 threadG:0 threadI:0 threadK:0 threadL:0 threadR:0 threadS:0 threadW:0 thread_W:0 apache_cpuload:
I compare the new script with original one and found new script actually use high speed version which use wget or lynx which I don't have on my windows box, what I can do now?
Re: Use of uninitialized value in concatenation
Your Apache's problem, server-status?auto didn't return proper values.leonardo_gyn wrote: Error is happening from console with root and with cacti user as well, the user i run cacti processes.
-
- Cacti User
- Posts: 85
- Joined: Sat Jan 22, 2005 4:51 pm
Re: Use of uninitialized value in concatenation
Yeah, i think you are sure ..... i couldnt reproduce the problem and unfortunelly i didnt check server-status?auto URL when I was having the problem. I have tried all combination of things, restarting apache, perl stock and updated versions on FC4 but couldnt, not even one single time, reproduce the error.dust2k wrote: Your Apache's problem, server-status?auto didn't return proper values.
I can get server-status page using my IP address (http://192.168.X.X/server-status), dont think that was the problem. In fact i was using www.myserver.com and not IP address ...
Well, i would like to have found a way of reproducing the error so we could handle it, but i couldnt ...
By the time, graphs are working perfectly !!!
- Attachments
-
- apache hits.jpg (47.2 KiB) Viewed 22307 times
-
- Cacti User
- Posts: 85
- Joined: Sat Jan 22, 2005 4:51 pm
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
The 5 mins are commonly known as the poller interval. This perfectly normal that it would take at least 5 min (for GAUGE data sources) or up to 10 mins (for COUNTER data sources, difference between two polling cycles will be needed) for data to come up...dust2k wrote:it's bit weired for me to implement it as well, first time it doesn't work, so I changed the httpd.conf and restarted apache, it still not working, even I just brower to test the url, but 5 mins later, everything start working, then I re-test other, everything is working..hehe .
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Here's a snippet from my /etc/http/conf/httpd.confand lateras well as a moduleAfter changing the httpd.cond, refresh/restart of apache will be necessary. Of course you'll need tpo customize the Allow directives to your needs.
Verify this by entering sth likeas URL to your browser to see sth like the attached picture
Reinhard
Code: Select all
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On
Code: Select all
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from .team-scheck.de
Allow from 127.0.0.1
</Location>
Code: Select all
LoadModule status_module modules/mod_status.so
Verify this by entering sth like
Code: Select all
http://localhost/server-status
Reinhard
- Attachments
-
- Apache's server-status page (example)
- Bildschirmfoto-1.png (53.08 KiB) Viewed 22298 times
yes, all of them, works beautifully, the only issue I have now, the graph doesn't have pure connection chart like the IIS one, but that's ok, not a big problem anyway.leonardo_gyn wrote:But are your graphs finally working now, all of them ?
and thanks for lvm's post, it should come bit early then will save me lots of time.
Hello!
Great tool - it is running on another server since several weeks.
With a new installation I have one problem. I read both major threads for "apachestats" now - but can't find a solution.
I installed apachestats yesterday (and the improved version this morning). Installation was without problems, the perl-script can grab the details.
But the graphs are not displayed:
I am using rrdtool-1.0.49.
Any hint to solve this problem would be great - thank you!
Kind regards, Jens
Great tool - it is running on another server since several weeks.
With a new installation I have one problem. I read both major threads for "apachestats" now - but can't find a solution.
I installed apachestats yesterday (and the improved version this morning). Installation was without problems, the perl-script can grab the details.
But the graphs are not displayed:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Apache Statistics - Hits / s" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Hits/sec" \
AREA:#AAABA1:"Hits/sec" \
GPRINT::LAST:"Current\:%8.2lf %s" \
GPRINT::AVERAGE:"Average\:%8.2lf %s" \
GPRINT::MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" Represents the number of hits per second\n" \
COMMENT:" ApacheStats v0.4 - Rolf Poser\n"
RRDTool Says:
ERROR: can't parse '#AAABA1:Hits/sec'
Any hint to solve this problem would be great - thank you!
Kind regards, Jens
Who is online
Users browsing this forum: No registered users and 0 guests