/[smecontribs]/rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-net_stats.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-agent/contribs7/smeserver-zabbix-agent-0.1-net_stats.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Mar 2 23:28:57 2009 UTC (15 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-zabbix-agent-0_1-22_el4_sme, smeserver-zabbix-agent-0_1-34_el4_sme, smeserver-zabbix-agent-0_1-35_el4_sme, smeserver-zabbix-agent-0_1-21_el4_sme, smeserver-zabbix-agent-0_1-46_el4_sme, smeserver-zabbix-agent-0_1-42_el4_sme, smeserver-zabbix-agent-0_1-41_el4_sme, smeserver-zabbix-agent-0_1-25_el4_sme, smeserver-zabbix-agent-0_1-49_el4_sme, smeserver-zabbix-agent-0_1-27_el4_sme, smeserver-zabbix-agent-0_1-38_el4_sme, smeserver-zabbix-agent-0_1-47_el4_sme, smeserver-zabbix-agent-0_1-30_el4_sme, smeserver-zabbix-agent-0_1-50_el4_sme, smeserver-zabbix-agent-0_1-32_el4_sme, smeserver-zabbix-agent-0_1-39_el4_sme, smeserver-zabbix-agent-0_1-45_el4_sme, smeserver-zabbix-agent-0_1-51_el4_sme, smeserver-zabbix-agent-0_1-29_el4_sme, smeserver-zabbix-agent-0_1-44_el4_sme, smeserver-zabbix-agent-0_1-52_el4_sme, smeserver-zabbix-agent-0_1-28_el4_sme, smeserver-zabbix-agent-0_1-26_el4_sme, smeserver-zabbix-agent-0_1-48_el4_sme, smeserver-zabbix-agent-0_1-36_el4_sme, smeserver-zabbix-agent-0_1-37_el4_sme, smeserver-zabbix-agent-0_1-33_el4_sme, smeserver-zabbix-agent-0_1-43_el4_sme, smeserver-zabbix-agent-0_1-31_el4_sme, smeserver-zabbix-agent-0_1-23_el4_sme, smeserver-zabbix-agent-0_1-24_el4_sme, smeserver-zabbix-agent-0_1-40_el4_sme, HEAD
Initial import of smeserver-zabbix-agent

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_netStats mezzanine_patched_smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_netStats
2 --- smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_netStats 1970-01-01 01:00:00.000000000 +0100
3 +++ mezzanine_patched_smeserver-zabbix-agent-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_agentd.conf/90UserParameters_netStats 2009-02-17 18:17:57.000000000 +0100
4 @@ -0,0 +1,32 @@
5 +# Some networks statistics
6 +# zabbix agent support natively interface stats, but, it's hard to create templates for a lot of
7 +# SME Servers which can use different interface name (External can be eth0, eth1, ppp0 etc...)
8 +# This way, net.if.in.internal, net.if.in.external, net.if.out.internal and net.if.out.external
9 +# will always refers to the correct interface.
10 +
11 +{
12 +my $internal = $InternalInterface{'Name'} || 'eth0';
13 +my $external = $ExternalInterface{'Name'} || 'eth1';
14 +
15 +# Do we use the bridge contrib ?
16 +# If yes, we reports only the traffic on the real ethernet interface.
17 +if ( (($bridge{'status'} || 'disabled') eq 'enabled') && (defined $bridge{'ethernetInterface'}) ){
18 + $internal = $bridge{'ethernetInterface'};
19 +}
20 +
21 +$OUT .=<<"HERE";
22 +
23 +UserParameter=net.if.in.internal,cat /proc/net/dev | grep $internal | cut -d":" -f2 | awk '{print \$1}'
24 +UserParameter=net.if.out.internal,cat /proc/net/dev | grep $internal | cut -d":" -f2 | awk '{print \$9}'
25 +
26 +HERE
27 +
28 +if (($SystemMode || 'serveronly') ne 'serveronly'){
29 + $OUT .=<<"HERE";
30 +UserParameter=net.if.in.external,cat /proc/net/dev | grep $external | cut -d":" -f2 | awk '{print \$1}'
31 +UserParameter=net.if.out.external,cat /proc/net/dev | grep $external | cut -d":" -f2 | awk '{print \$9}'
32 +
33 +HERE
34 +}
35 +}
36 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed