Current time: 01-25-2022, 09:12 AM Hello There, Guest! (LoginRegister)


Post Reply 
Graphical Statistics whith RRD-tools
Author Message
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #1
Graphical Statistics whith RRD-tools
1. Upload, unpack, copy to ispcp folder
2. Chekc permission and owners
3. crontab -e

*/1 * * * * /var/www/ispcp/engine/rrd/resourses.sh >/dev/null 2>&1
*/1 * * * * /var/www/ispcp/engine/rrd/netstat.sh >/dev/null 2>&1
*/1 * * * * /var/www/ispcp/engine/rrd/memory.sh >/dev/null 2>&1
*/4 * * * * /var/www/ispcp/engine/rrd/hdd_usage.sh >/dev/null 2>&1
*/3 * * * * /var/www/ispcp/engine/rrd/speed_fan.sh >/dev/null 2>&1
*/2 * * * * /var/www/ispcp/engine/rrd/temp_cpu.sh >/dev/null 2>&1
*/2 * * * * /var/www/ispcp/engine/rrd/temp_hdd.sh >/dev/null 2>&1

4. yum install rrdtool lm_sensors net-snmp net-snmp-utils hddtemp

5. edit /etc/snmp/snmpd.conf and ad your data
PHP Code:
syslocationMain
sysservices 0
syscontact root
(dog)domain.tld

#rwcommunity rumata 127.0.0.1
#rocommunity 127.0.0.1/24

master yes

#pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

#sysservices 76
sysservices 31region

rocommunity superpublic 
#PASSWORD!
#com2sec public default public
#group public v2c public
#access public "" any noauth exact all none none

disk /
disk /var
disk /dev/shm 

6. service snmpd start

7. Lets adding new pages to menu
add to admin/menu_statistics.tpl after codes
<tr>
<td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
</tr>

PHP Code:
<tr>
     <
td><a href="graph_cpu.php" class="submenu">{TR_MENU_CPU_GRAPH}</a></td>
    </
tr>
    <
tr>
     <
td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
    </
tr>
    <
tr>
     <
td><a href="graph_mem.php" class="submenu">{TR_MENU_MEM_GRAPH}</a></td>
    </
tr>
    <
tr>
     <
td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
    </
tr>
    <
tr>
     <
td><a href="graph_hddusage.php" class="submenu">{TR_MENU_HDD_GRAPH}</a></td>
    </
tr>
    <
tr>
     <
td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
    </
tr>
    <
tr>
     <
td><a href="graph_netstat.php" class="submenu">{TR_MENU_NET_GRAPH}</a></td>
    </
tr>
    <
tr>
     <
td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
    </
tr>
    <
tr>
     <
td><a href="graph_temp.php" class="submenu">{TR_MENU_TEMP_GRAPH}</a></td>
    </
tr>
    <
tr>
     <
td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
    </
tr>
    <
tr>
     <
td>&nbsp;</td>
    </
tr

8. add to /var/www/ispcp/gui/include/admin-functions.php
after line 'TR_MENU_SERVER_STATISTICS' => tr('Server statistics'),
new lines:
'TR_MENU_CPU_GRAPH' => tr('CPU Load'),
'TR_MENU_MEM_GRAPH' => tr('Memory Usage'),
'TR_MENU_HDD_GRAPH' => tr('HDDs Usage'),
'TR_MENU_NET_GRAPH' => tr('Ehernet Speed'),
'TR_MENU_TEMP_GRAPH' => tr('Termal Graphic'),

9. use
#/usr/sbin/sensors-detect
for automatic sensors detecting for you MainBoard
If you have any problems whith detect sensors, use
#lspci
#man dmidecode
for get information about your chipset
and meybe you have found config at thise page
http://www.lm-sensors.org/wiki/Configurations

NOTE - In same mainboard not all sensors is worked Sad

8. goto Admin area and get pleasure!

Known Problem
If you use
#services network restart
instead reboot
meybe you have a wrong network statistics

P/S Made in Russia, Moscow Wink
Data-Stream Web Service Provider
What are opinions and suggestions?
It may make the increase of small plots by clicking the mouse?
Or the inclusion of statistics to show resellers (by setup page)? This will avoid the stupid questions to tech support on the server load.


Attached File(s) Thumbnail(s)
           

.gz  ispGraphStat_0.5.tar.gz (Size: 8.88 KB / Downloads: 51)
(This post was last modified: 03-30-2010 10:58 AM by data-stream_ru.)
03-30-2010 10:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
TheCry Away
Member
***

Posts: 851
Joined: Oct 2008
Reputation: 21
Post: #2
RE: Graphical Statistics whith RRD-tools
Great work from russia!!!
I like rrdtool and you make my day with your solution!!!
I think there is more capability to create a own ispCP serverhealth overview!
03-30-2010 03:34 PM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #3
RE: Graphical Statistics whith RRD-tools
For Debian use:
Code:
aptitude install snmp hddtemp rrdtool wmtemp wmgtemp
Hope, i have all Smile

Maybe it's possible to integrate also:
http://collectd.org
(This post was last modified: 03-30-2010 03:59 PM by gOOvER.)
03-30-2010 03:52 PM
Visit this user's website Find all posts by this user Quote this message in a reply
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #4
RE: Graphical Statistics whith RRD-tools
At now I work whith parsing nginx and Apache stat.
And second I vant to show cpu by nice, proc, system, idle
At next I have a plane FlowScan integration
http://www.caida.org/tools/utilities/flo...alysis.xml

But I haven't planes to concurent thith cacti and other hi-end packages Smile
They can be instaled separately.

Ours solution for easy integration and no porblem to heve. This is the first task. Then we and you can develop.

2All: Please, see HDD speed stat. Maybe an error in counting. Or maybe not...
(This post was last modified: 03-30-2010 06:42 PM by data-stream_ru.)
03-30-2010 06:35 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #5
RE: Graphical Statistics whith RRD-tools
Hello

Oh god, I like this. Tested on Debian ?

Thank a lot for your great work here.
03-30-2010 07:03 PM
Quote this message in a reply
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #6
RE: Graphical Statistics whith RRD-tools
Hi!
Its OS independent.
But you can meet a problem whith your mainboard sensors or snmpd.
Some mainboard's sensor work incorrect, and some don't detected.
I have thise problem in MCI mainboard whith AMD Althon 2core.

See comments in sh files. In some cases, suggested two solutions.
Oh, I forgot ...
For 1Gb Ethernet switch to be 64x counters. See comments in netstat.sh
(This post was last modified: 03-30-2010 07:53 PM by data-stream_ru.)
03-30-2010 07:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #7
RE: Graphical Statistics whith RRD-tools
There is a bug in the archive:
/omega_originl/ -> /omega_original/
There is a bug in the temp_cpu.sh :
replace
core0=`echo core1/1000| bc`
core1=`echo core1/1000| bc`
to
core0=`echo $core0/1000| bc`
core1=`echo $core1/1000| bc`
(This post was last modified: 03-31-2010 09:15 AM by data-stream_ru.)
03-31-2010 08:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #8
RE: Graphical Statistics whith RRD-tools
New version whith Apache and nginx HTTP-servers statistics

Improved CPUs stat.
Removed bugs

For upgrate remove old database /rrd/bd/resoures.rrd

Aditional instraction

3. crontab -e

*/1 * * * * /var/www/ispcp/engine/rrd/resourses.sh >/dev/null 2>&1
*/1 * * * * /var/www/ispcp/engine/rrd/netstat.sh >/dev/null 2>&1
*/1 * * * * /var/www/ispcp/engine/rrd/memory.sh >/dev/null 2>&1
*/4 * * * * /var/www/ispcp/engine/rrd/hdd_usage.sh >/dev/null 2>&1
*/3 * * * * /var/www/ispcp/engine/rrd/speed_fan.sh >/dev/null 2>&1
*/2 * * * * /var/www/ispcp/engine/rrd/temp_cpu.sh >/dev/null 2>&1
*/2 * * * * /var/www/ispcp/engine/rrd/temp_hdd.sh >/dev/null 2>&1
*/2 * * * * /var/www/ispcp/engine/rrd/nginx-collect >/dev/null 2>&1
*/5 * * * * /var/www/ispcp/engine/rrd/nginx-graph >/dev/null 2>&1 #optional for nginx http-server
*/3 * * * * /var/www/ispcp/engine/rrd/apache.sh >/dev/null 2>&1 #optional for nginx http-server

9. Edit /etc/httpd/httpd.conf
LoadModule status_module modules/mod_status.so

ExtendedStatus On

<Location /serverstatus>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1 78.46.102.101
</Location>

10.
#service httpd reload

11. add points to menu
admin/menu_statistics.tpl

<tr>
<td><a href="graph_nginx.php" class="submenu">nginx</a></td>
</tr>
<tr>
<td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
</tr>
<tr>
<td><a href="graph_apache.php" class="submenu">Apache</a></td>
</tr>
<tr>
<td height="3" width="193"><img src="{THEME_COLOR_PATH}/images/top/menu_separator.jpg" height="3" width="193" alt="" /></td>
</tr>

------- optionaly for nginx ---------

12. add to nginx.conf in server directive (server with panel)

location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}

You can add this location on each domain and subdomain that you watn to monitoring. Into vhosts.conf
Plots shows automaticaly if preasent

13. Edit ispcp/engine/rrd/nginx-rrd.conf

You can add to constant SERVERS_URL all ips and domains wich our want to minitoring

14. service nginx reload
if you have an eroor recompile nginx whith option
--with-http_stub_status_module

15. test
#GET http://localhost/nginx_status

Its all.


Attached File(s)
.gz  ispGraphStat_0.7_http.tar.gz (Size: 12.77 KB / Downloads: 33)
(This post was last modified: 04-02-2010 03:24 PM by data-stream_ru.)
03-31-2010 08:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
data-stream_ru Offline
Moderator
*****
Moderators

Posts: 471
Joined: Jan 2009
Reputation: 7
Post: #9
RE: Graphical Statistics whith RRD-tools
Any reports?
04-12-2010 07:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
TheCry Away
Member
***

Posts: 851
Joined: Oct 2008
Reputation: 21
Post: #10
RE: Graphical Statistics whith RRD-tools
Sorry... I did not have any time to test this...
On wednesday i will include it on my testsystem...
I think on friday i can give you some reports!
04-12-2010 08:26 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)