PDA

View Full Version : template seems don't work in 1.6.7


fanchao
11-01-2010, 03:34
I use zabbix to monitor Squid Server via snmp (oid .1.3.6.1.4.1.3495.1.3.* ) .
The template is wrote like below
<zabbix_export version="1.0" date="20.08.09" time="11.55">
<hosts>
<host name="Temp_Squid01">
<useip>0</useip>
<dns></dns>
<ip>0.0.0.0</ip>
<port>10050</port>
<status>3</status>
<groups>
</groups>
<items>
<item type="4" key="MemUsage" value_type="3">
<description>Total memory accounted for KB</description>
<ipmi_sensor></ipmi_sensor>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>3</status>
<units></units>
<multiplier>1</multiplier>
<delta>0</delta>
<formula></formula>
<lastlogsize>0</lastlogsize>
<logtimefmt></logtimefmt>
<delay_flex></delay_flex>
<params>DSN=&lt;database source name&gt;\nuser=&lt;user name&gt;\npassword=&lt;password&gt;\nsql=&lt;query&gt;</params>
<trapper_hosts></trapper_hosts>
<snmp_community>public</snmp_community>
<snmp_oid>.1.3.6.1.4.1.3495.1.3.1.3.0</snmp_oid>
<snmp_port>161</snmp_port>
<snmpv3_securityname></snmpv3_securityname>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase></snmpv3_authpassphrase>
<snmpv3_privpassphrase></snmpv3_privpassphrase>
</item>
I added hosts, but all the values got were "0"
Use "tcpdump", i got these message

10:35:42.503479 IP 21.161.251.27.47694 > napq01.letras.ufmg.br.snmp: GetRequest(33) E:3495.1.3.2.1.15.0
10:35:42.504669 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.47694: GetResponse(34) E:3495.1.3.2.1.15.0=[|snmp]
10:35:43.911286 IP 21.161.251.27.47335 > napq01.letras.ufmg.br.snmp: GetRequest(32) E:3495.1.3.1.5.0
10:35:43.912464 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.47335: GetResponse(33) E:3495.1.3.1.5.0=1
10:35:44.033528 IP 21.161.251.27.59377 > napq01.letras.ufmg.br.snmp: GetRequest(34) E:3495.1.3.2.2.1.2.60[|snmp]
10:35:44.034632 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.59377: GetResponse(35) E:3495.1.3.2.2.1.2.60=[|snmp]
10:35:45.899145 IP 21.161.251.27.59756 > napq01.letras.ufmg.br.snmp: GetRequest(33) E:3495.1.3.2.1.12.0
10:35:45.900368 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.59756: GetResponse(37) E:3495.1.3.2.1.12.0=[|snmp]
10:35:46.120848 IP 21.161.251.27.43817 > napq01.letras.ufmg.br.snmp: GetRequest(32) E:3495.1.3.1.3.0
10:35:46.121967 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.43817: GetResponse(36) E:3495.1.3.1.3.0=[|snmp]
10:35:47.993204 IP 21.161.251.27.42731 > napq01.letras.ufmg.br.snmp: GetRequest(33) E:3495.1.3.2.1.13.0
10:35:47.994448 IP napq01.letras.ufmg.br.snmp > 201.11.51.27.42731: GetResponse(36) E:3495.1.3.2.1.13.0=[|snmp]

i cannot find out where the problems are !
Any help? Thanks !
Sorry for my bad english, i am Chinese.

fanchao
11-01-2010, 04:19
Does the zabbix_agent must be installed on the Squid Server ?
[root@fan ~]# snmpget -v 2c -c public 115.14.100.65 .1.3.6.1.4.1.3495.1.3.1.3.0
SNMPv2-SMI::enterprises.3495.1.3.1.3.0 = INTEGER: 9308363

MrKen
11-01-2010, 07:26
If you plan to monitor by snmp then you don't need to install the zabbix agent.

From your template above:
<snmp_oid>.1.3.6.1.4.1.3495.1.3.1.3.0</snmp_oid>
key="MemUsage"

That will never work, because the OID doesn't match the Key.
.1.3.6.1.4.1.3495.1.3.1.3.0 = cacheSysDefReads

That means key=cacheSysDefReads

http://www.oidview.com/mibs/3495/SQUID-MIB.html

MrKen

fanchao
11-01-2010, 10:21
Thank you MrKen .
I have found out where the problem is, it's not because of the wrong key, and the key can be anything you want !
It's the "formula". Here it should set to "1024".

I had another question, now, How can I know the right way to set these options, like "type", "Value_type", "formula" ?

Any documentation available ?