Ad Widget

Collapse

Zabbix 2.2 proxy not syncing SNMP? BUG? ver2 fine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avenn
    Junior Member
    • Nov 2011
    • 12

    #1

    Zabbix 2.2 proxy not syncing SNMP? BUG? ver2 fine

    Hi,

    Using:

    Ubuntu 12.04LTS 64bit
    Zabbix 2.2
    SNMPv2c

    No firewall – test system

    My Setup:

    88.x.x.x Server >>> OpenVPN 10.8.0.1 to 10.8.0.2 >>>> 192.168.1.122 Proxy >>>> 192.168.0.1 (ADSL Gateway)


    I want to get the following snmp OID (1.3.6.1.2.1.2.2.1.2.3)value from 192.168.0.1


    Item details:

    Name Triggers Key Interval History Trends Type Applications Status Error
    ifDesc ifDesc 10 90 SNMPv2 agent Enabled


    zabbix@RankSZabProxy ~ $ sudo snmpwalk -v 2c -c obsit 192.168.0.1 1.3.6.1.2.1.2.2.1.2.3
    iso.3.6.1.2.1.2.2.1.2.3 = STRING: "ppp"


    Want to get SNMP value from remote site via proxy. It all appears to work up to and including putting the values into the sqlite database by the proxy but no data sent (via JSON??) to the server


    On the proxy log – SNMP values data is entered into sqlite as expected:


    zabbix@RankSZabProxy ~ $ tail -f /tmp/zabbix_proxy.log | grep ppp
    insert into proxy_history (itemid,clock,ns,value) values (23400,1385334510,408793222,'ppp');


    This in confirmed by viewing sqlite3


    Sqlite>select * from proxy_history;
    6395|23442|1385333912|0||0|3|0|171610825|0
    6396|23402|1385333912|0||0|7139|0|176332656|0
    6397|23400|1385333911|0||0|ppp|0|154647112|0
    6398|23403|1385333914|0||0|10000000|0|624570300|0
    Sqlite>


    I don`t know how zabbix proxy sends (syncs) data I guess JSON based? Anyway ps aux gives the following:


    zabbix 8769 0.0 0.4 41964 1928 ? S 23:27 0:00 /usr/sbin/zabbix_proxy: history syncer #1 [synced 0 items in 0.000516 sec, idle 5 sec]
    zabbix 8770 0.0 0.4 41964 1928 ? S 23:27 0:00 /usr/sbin/zabbix_proxy: history syncer #2 [synced 0 items in 0.000310 sec, idle 5 sec]
    zabbix 8771 0.0 0.4 41964 1932 ? S 23:27 0:00 /usr/sbin/zabbix_proxy: history syncer #3 [synced 0 items in 0.004927 sec, idle 5 sec]
    zabbix 8772 0.0 0.4 41964 1928 ? S 23:27 0:00 /usr/sbin/zabbix_proxy: history syncer #4 [synced 1 items in 0.025156 sec, idle 5 sec]




    Whats interesting is I am only requesting one item and the last line suggests this wasy successful. As in its was synced?



    Extra log info:

    2196:20131124:235629.449 In substitute_simple_macros() data:'obsit'
    2196:20131124:235629.450 In substitute_key_macros() data:'1.3.6.1.2.1.2.2.1.2.3'
    2196:20131124:235629.452 End of substitute_key_macros():SUCCEED data:'1.3.6.1.2.1.2.2.1.2.3'
    2196:20131124:235629.452 In get_value() key:'ifDescr'
    2196:20131124:235629.453 In get_value_snmp() key:'ifDescr' oid:'1.3.6.1.2.1.2.2.1.2.3'
    2196:20131124:235629.454 In snmp_open_session()
    2196:20131124:235629.455 SNMP [[email protected]:161]
    2196:20131124:235629.457 End of snmp_open_session()
    2196:20131124:235629.459 Standard processing
    2196:20131124:235629.460 In snmp_normalize(oid:1.3.6.1.2.1.2.2.1.2.3)
    2196:20131124:235629.461 End of snmp_normalize():1.3.6.1.2.1.2.2.1.2.3
    2196:20131124:235629.462 In get_snmp() oid:'1.3.6.1.2.1.2.2.1.2.3'
    2196:20131124:235629.464 get_snmp() snmp_synch_response():0
    2196:20131124:235629.465 In snmp_set_value()
    2196:20131124:235629.466 In snmp_get_octet_string()
    2196:20131124:235629.468 snmp_get_octet_string() full value:'STRING: "ppp"'
    2196:20131124:235629.469 End of snmp_get_octet_string():'ppp'
    2196:20131124:235629.470 End of snmp_set_value():SUCCEED
    2196:20131124:235629.472 End of get_snmp():SUCCEED
    2196:20131124:235629.472 In snmp_close_session()
    2196:20131124:235629.474 End of snmp_close_session()
    2196:20131124:235629.476 End of get_value_snmp():SUCCEED
    2196:20131124:235629.477 End of get_value():SUCCEED
    2196:20131124:235629.477 In activate_host() hostid:10091 itemid:23469 type:4
    2196:20131124:235629.479 End of get_values():1



    itemid:23469



    Using chive on the zabbix server and SQL statement: SELECT * FROM `history_log` `t` WHERE `itemid` LIKE '23469' LIMIT 0, 20

    I get: An empty resultset has been returned.

    Same for history, history_text etc and more importantly history_str

    This appears to confirm no data getting through to server.

    When I try to compare syncs:



    Server:

    1619:20131125:002137.580 history syncer #3 [synced 0 items in 0.000307 sec, syncing history]
    1619:20131125:002137.580 In DCsync_history() history_first:0 history_num:0
    1619:20131125:002137.580 history syncer #3 [synced 0 items in 0.000044 sec, idle 5 sec]
    1603:20131125:002137.588 history syncer #1 [synced 0 items in 0.000245 sec, syncing history]
    1603:20131125:002137.588 In DCsync_history() history_first:0 history_num:0
    1603:20131125:002137.588 history syncer #1 [synced 0 items in 0.000043 sec, idle 5 sec]
    1618:20131125:002137.592 history syncer #2 [synced 0 items in 0.000247 sec, syncing history]
    1618:20131125:002137.592 In DCsync_history() history_first:0 history_num:0
    1618:20131125:002137.593 history syncer #2 [synced 0 items in 0.000252 sec, idle 5 sec]
    1620:20131125:002137.593 history syncer #4 [synced 0 items in 0.000138 sec, syncing history]
    1620:20131125:002137.593 In DCsync_history() history_first:0 history_num:0
    1620:20131125:002137.593 history syncer #4 [synced 0 items in 0.000233 sec, idle 5 sec]
    1619:20131125:002142.580 history syncer #3 [synced 0 items in 0.000044 sec, syncing history]
    1619:20131125:002142.581 In DCsync_history() history_first:0 history_num:0
    1619:20131125:002142.581 history syncer #3 [synced 0 items in 0.000180 sec, idle 5 sec]
    1603:20131125:002142.588 history syncer #1 [synced 0 items in 0.000043 sec, syncing history]
    1603:20131125:002142.588 In DCsync_history() history_first:0 history_num:0
    1603:20131125:002142.588 history syncer #1 [synced 0 items in 0.000117 sec, idle 5 sec]
    1620:20131125:002142.594 history syncer #4 [synced 0 items in 0.000233 sec, syncing history]
    1618:20131125:002142.594 history syncer #2 [synced 0 items in 0.000252 sec, syncing history]
    1618:20131125:002142.594 In DCsync_history() history_first:0 history_num:0
    1620:20131125:002142.594 In DCsync_history() history_first:0 history_num:0
    1618:20131125:002142.594 history syncer #2 [synced 0 items in 0.000269 sec, idle 5 sec]
    1620:20131125:002142.594 history syncer #4 [synced 0 items in 0.000218 sec, idle 5 sec]
    1619:20131125:002147.581 history syncer #3 [synced 0 items in 0.000180 sec, syncing history]
    1619:20131125:002147.581 In DCsync_history() history_first:0 history_num:0
    1619:20131125:002147.581 history syncer #3 [synced 0 items in 0.000043 sec, idle 5 sec]
    1603:20131125:002147.588 history syncer #1 [synced 0 items in 0.000117 sec, syncing history]
    1603:20131125:002147.589 In DCsync_history() history_first:0 history_num:0
    1603:20131125:002147.589 history syncer #1 [synced 0 items in 0.000042 sec, idle 5 sec]
    1620:20131125:002147.595 history syncer #4 [synced 0 items in 0.000218 sec, syncing history]
    1620:20131125:002147.595 In DCsync_history() history_first:0 history_num:0
    1620:20131125:002147.595 history syncer #4 [synced 0 items in 0.000053 sec, idle 5 sec]
    1618:20131125:002147.595 history syncer #2 [synced 0 items in 0.000269 sec, syncing history]
    1618:20131125:002147.595 In DCsync_history() history_first:0 history_num:0
    1618:20131125:002147.596 history syncer #2 [synced 0 items in 0.000259 sec, idle 5 sec]



    Proxy:

    2210:20131125:002137.154 history syncer #2 [synced 0 items in 0.000387 sec, syncing history]
    2210:20131125:002137.154 In DCsync_history() history_first:281 history_num:0
    2210:20131125:002137.155 history syncer #2 [synced 0 items in 0.000340 sec, idle 5 sec]
    2211:20131125:002137.161 history syncer #3 [synced 0 items in 0.000428 sec, syncing history]
    2211:20131125:002137.174 In DCsync_history() history_first:281 history_num:0
    2211:20131125:002137.175 history syncer #3 [synced 0 items in 0.000431 sec, idle 5 sec]
    2209:20131125:002137.162 history syncer #1 [synced 0 items in 0.000431 sec, syncing history]
    2209:20131125:002137.177 In DCsync_history() history_first:281 history_num:0
    2209:20131125:002137.177 history syncer #1 [synced 0 items in 0.000427 sec, idle 5 sec]
    2195:20131125:002139.301 get_snmp() snmp_synch_response():0
    2212:20131125:002140.074 history syncer #4 [synced 0 items in 0.001623 sec, syncing history]
    2212:20131125:002140.076 In DCsync_history() history_first:281 history_num:1
    2212:20131125:002140.086 history syncer #4 [synced 1 items in 0.010029 sec, idle 5 sec]
    2210:20131125:002142.155 history syncer #2 [synced 0 items in 0.000340 sec, syncing history]
    2210:20131125:002142.156 In DCsync_history() history_first:282 history_num:0
    2210:20131125:002142.156 history syncer #2 [synced 0 items in 0.000353 sec, idle 5 sec]
    2211:20131125:002142.175 history syncer #3 [synced 0 items in 0.000431 sec, syncing history]
    2211:20131125:002142.176 In DCsync_history() history_first:282 history_num:0
    2211:20131125:002142.176 history syncer #3 [synced 0 items in 0.000430 sec, idle 5 sec]
    2209:20131125:002142.178 history syncer #1 [synced 0 items in 0.000427 sec, syncing history]
    2209:20131125:002142.180 In DCsync_history() history_first:282 history_num:0
    2209:20131125:002142.183 history syncer #1 [synced 0 items in 0.002106 sec, idle 5 sec]
    2212:20131125:002145.088 history syncer #4 [synced 1 items in 0.010029 sec, syncing history]
    2212:20131125:002145.089 In DCsync_history() history_first:282 history_num:0
    2212:20131125:002145.091 history syncer #4 [synced 0 items in 0.001499 sec, idle 5 sec]
    2210:20131125:002147.157 history syncer #2 [synced 0 items in 0.000353 sec, syncing history]
    2210:20131125:002147.157 In DCsync_history() history_first:282 history_num:0
    2210:20131125:002147.158 history syncer #2 [synced 0 items in 0.000346 sec, idle 5 sec]
    2211:20131125:002147.177 history syncer #3 [synced 0 items in 0.000430 sec, syncing history]
    2211:20131125:002147.184 In DCsync_history() history_first:282 history_num:0
    2209:20131125:002147.186 history syncer #1 [synced 0 items in 0.002106 sec, syncing history]
    2209:20131125:002147.188 In DCsync_history() history_first:282 history_num:0
    2209:20131125:002147.190 history syncer #1 [synced 0 items in 0.002014 sec, idle 5 sec]
    2211:20131125:002147.192 history syncer #3 [synced 0 items in 0.000432 sec, idle 5 sec]
    2195:20131125:002149.330 get_snmp() snmp_synch_response():0
    2212:20131125:002150.093 history syncer #4 [synced 0 items in 0.001499 sec, syncing history]
    2212:20131125:002150.094 In DCsync_history() history_first:282 history_num:1
    2212:20131125:002150.103 history syncer #4 [synced 1 items in 0.009158 sec, idle 5 sec]
    2210:20131125:002152.158 history syncer #2 [synced 0 items in 0.000346 sec, syncing history]
    2210:20131125:002152.159 In DCsync_history() history_first:283 history_num:0
    2210:20131125:002152.159 history syncer #2 [synced 0 items in 0.000353 sec, idle 5 sec]
    2211:20131125:002152.197 history syncer #3 [synced 0 items in 0.000432 sec, syncing history]
    2209:20131125:002152.197 history syncer #1 [synced 0 items in 0.002014 sec, syncing history]
    2209:20131125:002152.206 In DCsync_history() history_first:283 history_num:0
    2209:20131125:002152.206 history syncer #1 [synced 0 items in 0.000474 sec, idle 5 sec]
    2211:20131125:002152.210 In DCsync_history() history_first:283 history_num:0
    2211:20131125:002152.211 history syncer #3 [synced 0 items in 0.001540 sec, idle 5 sec]




    Only proxy shows item syncing - 2212:20131125:002150.103 history syncer #4 [synced 1 items in 0.009158 sec, idle 5 sec]


    Can anyone help? Pretty Please! Version 2 fine.

    Regards

    Aidan
  • avenn
    Junior Member
    • Nov 2011
    • 12

    #2
    Solved

    I noticed on the open VPN logs that I was having synchronisation issues in relation to TLS (TLS Error: local/remote TLS keys are out of sync.

    I switched from UDP to TCP (keeps it in sync) and the data is now successfully being transferred from the zabbix proxy to the zabbix server. SOLVED.

    Comment

    Working...