Spine SNMP v3 SNMP Context

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
z3t4
Posts: 5
Joined: Wed May 06, 2015 4:43 am

Spine SNMP v3 SNMP Context

Post by z3t4 »

Hi,
I'm using cacti/spine 0.8.8h on debian jessie.

I have problems retrieving data using spine on a radius server that is configured with an snmpv3 context, on the device page we than see that it's properly configured, as it displays the snmp info on the top left corner, but spine is unable to get the snmp data:

Code: Select all

root@cacti02[PROD]:~/cacti-0.8.8h# spine -V 7 -R -H 2067
SPINE: Using spine config file [/etc/cacti/spine.conf]
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'path_webroot''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'path_cactilog''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The path_php_server variable is /usr/share/cacti/site/script_server.php
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The path_cactilog variable is /var/log/cacti/cacti.log
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'log_destination''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The log_destination variable is 1 (FILE)
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'path_php_binary''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The path_php variable is /usr/bin/php
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'availability_method''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The availability_method variable is 4
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'ping_recovery_count''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The ping_recovery_count variable is 3
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'ping_failure_count''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The ping_failure_count variable is 2
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'ping_method''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The ping_method variable is 3
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'ping_retries''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The ping_retries variable is 3
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'ping_timeout''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The ping_timeout variable is 400
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'snmp_retries''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The snmp_retries variable is 3
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'log_perror''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The log_perror variable is 1
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'log_pwarn''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The log_pwarn variable is 1
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'boost_redirect''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The boost_redirect variable is 0
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'log_pstats''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The log_pstats variable is 1
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'max_threads''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The threads variable is 10
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'poller_interval''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The polling interval is 300 seconds
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'concurrent_processes''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The number of concurrent processes is 2
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'script_timeout''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The script timeout is 15
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'php_servers''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The number of php script servers to run is 5
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT action FROM poller_item WHERE action=2 AND host_id IN(2067) LIMIT 1'
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Host List to be polled='2067', TotalPHPScripts='0'
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The PHP Script Server is Not Required
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT value FROM settings WHERE name = 'max_get_size''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 20
SPINE: Version 0.8.8h starting
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Spine is running asroot.
08/23/2016 08:51:59 AM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Issues with SNMP Header Version information, assuming old version of Net-SNMP.
08/23/2016 08:51:59 AM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SHOW COLUMNS FROM host LIKE 'poller_id''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SHOW COLUMNS FROM host LIKE 'device_threads''
08/23/2016 08:51:59 AM - SPINE: Poller[0] NOTE: Spine will support multithread device polling.
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT id, device_threads FROM host WHERE disabled='' AND id IN(2067) ORDER BY id'
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'INSERT INTO poller_time (poller_id, pid, start_time, end_time) VALUES (0, 9554, NOW(), '0000-00-00 00:00:00')'
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 2
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT snmp_port, count(snmp_port) FROM poller_item WHERE host_id=0 AND rrd_next_step < 0 GROUP BY snmp_port '
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT id, hostname, snmp_community, snmp_version, snmp_username, snmp_password, snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context, snmp_port, snmp_timeout, max_oids, availability_method, ping_method, ping_port, ping_timeout, ping_retries, status, status_event_count, status_fail_date, status_rec_date, status_last_error, min_time, max_time, cur_time, avg_time, total_polls, failed_polls, availability FROM host WHERE id=2067'
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT action, hostname, snmp_community, snmp_version, snmp_username, snmp_password, rrd_name, rrd_path, arg1, arg2, arg3, local_data_id, rrd_num, snmp_port, snmp_timeout, snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context  FROM poller_item WHERE host_id=0 and rrd_next_step <=0 ORDER by snmp_port '
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'UPDATE poller_item SET rrd_next_step=IF((rrd_next_step-300)>=0, (rrd_next_step-300), (rrd_step-300)) WHERE host_id=0'
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[0] TH[1] Total Time: 0.0012 Seconds
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[0] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] DEBUG: Entering TCP Ping
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] DEBUG: TCP Host Alive, Try Count:1, Time:0.5410 ms
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] PING Result: TCP: Host is Alive
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] SNMP Result: SNMP not performed due to setting or ping result
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'UPDATE host SET status='3', status_event_count='0', status_fail_date='0000-00-00 00:00:00', status_rec_date='0000-00-00 00:00:00', status_last_error='Host did not respond to SNMP, TCP: Cannot connect to host', min_time='0.000000', max_time='390.133860', cur_time='0.540970', avg_time='2.713553', total_polls='45987', failed_polls='2', availability='99.9957' WHERE id='2067''
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT data_query_id, action, op, assert_value, arg1 FROM poller_reindex WHERE host_id=2067'
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] TH[1] Host has no information for recache.
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT snmp_port, count(snmp_port) FROM poller_item WHERE host_id=2067 AND rrd_next_step < 0 GROUP BY snmp_port '
08/23/2016 08:51:59 AM - SPINE: Poller[0] DEVDBG: SQL:'SELECT action, hostname, snmp_community, snmp_version, snmp_username, snmp_password, rrd_name, rrd_path, arg1, arg2, arg3, local_data_id, rrd_num, snmp_port, snmp_timeout, snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context  FROM poller_item WHERE host_id=2067 and rrd_next_step <=0 ORDER by snmp_port '
08/23/2016 08:51:59 AM - SPINE: Poller[0] Host[2067] TH[1] NOTE: There are '10' Polling Items for this Host
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20130] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20130] SNMP: v3: 10.17.6.3, dsname: rad_auth_unknow, oid: 1.3.6.1.2.1.67.1.1.1.1.14, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20129] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20129] SNMP: v3: 10.17.6.3, dsname: rad_auth_request, oid: 1.3.6.1.2.1.67.1.1.1.1.5, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20128] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20128] SNMP: v3: 10.17.6.3, dsname: rad_auth_rejected, oid: 1.3.6.1.2.1.67.1.1.1.1.9, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20127] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20127] SNMP: v3: 10.17.6.3, dsname: rad_auth_malformed, oid: 1.3.6.1.2.1.67.1.1.1.1.11, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20126] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20126] SNMP: v3: 10.17.6.3, dsname: rad_auth_invalid, oid: 1.3.6.1.2.1.67.1.1.1.1.6, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20125] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20125] SNMP: v3: 10.17.6.3, dsname: rad_auth_duplicated, oid: 1.3.6.1.2.1.67.1.1.1.1.7, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20124] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20124] SNMP: v3: 10.17.6.3, dsname: rad_auth_drop, oid: 1.3.6.1.2.1.67.1.1.1.1.13, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20123] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20123] SNMP: v3: 10.17.6.3, dsname: rad_auth_challenges, oid: 1.3.6.1.2.1.67.1.1.1.1.10, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20122] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20122] SNMP: v3: 10.17.6.3, dsname: rad_auth_bad_auth, oid: 1.3.6.1.2.1.67.1.1.1.1.12, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20121] WARNING: SNMP timeout detected [900 ms], ignoring host '10.17.6.3'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DS[20121] SNMP: v3: 10.17.6.3, dsname: rad_auth_access_ok, oid: 1.3.6.1.2.1.67.1.1.1.1.8, value: U
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEVDBG: SQL:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (20130,'rad_auth_unknow','2016-08-23 08:51:59','U'),(20129,'rad_auth_request','2016-08-23 08:51:59','U'),(20128,'rad_auth_rejected','2016-08-23 08:51:59','U'),(20127,'rad_auth_malformed','2016-08-23 08:51:59','U'),(20126,'rad_auth_invalid','2016-08-23 08:51:59','U'),(20125,'rad_auth_duplicated','2016-08-23 08:51:59','U'),(20124,'rad_auth_drop','2016-08-23 08:51:59','U'),(20123,'rad_auth_challenges','2016-08-23 08:51:59','U'),(20122,'rad_auth_bad_auth','2016-08-23 08:51:59','U'),(20121,'rad_auth_access_ok','2016-08-23 08:51:59','U') ON DUPLICATE KEY UPDATE output=VALUES(output)'
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEVDBG: SQL:'UPDATE poller_item SET rrd_next_step=IF((rrd_next_step-300)>=0, (rrd_next_step-300), (rrd_step-300)) WHERE host_id=2067'
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] Total Time:   3.6 Seconds
08/23/2016 08:52:02 AM - SPINE: Poller[0] Host[2067] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEVDBG: SQL:'replace into settings (name,value) values ('date',NOW())'
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEVDBG: SQL:'UPDATE poller_time SET end_time=NOW() WHERE poller_id=0 AND pid=9554'
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: PHP Script Server Pipes Closed
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: Allocated Variable Memory Freed
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: MYSQL Free & Close Completed
08/23/2016 08:52:02 AM - SPINE: Poller[0] DEBUG: Net-SNMP Close Completed
08/23/2016 08:52:02 AM - SPINE: Poller[0] Time: 3.6425 s, Threads: 10, Hosts: 2
I think this happens because there is no "SNMP Context" on the data template's custom data, so I can't mark It as "Use Per-Data Source Value (Ignore this Value)".

I searched for this issue and found this http://bugs.cacti.net/print_bug_page.php?bug_id=1372, it suggests:
Ouch, who screwed up there? Well, this is going to half to be a managed change as we consider this data input method to be a system one. You could unhide it and make the changes yourself, but then when you publish templates you could wreak havoc.
But I couldn't find how to unhide nor modify Get SNMP data input method.

Thanks and kind regards.
z3t4
Posts: 5
Joined: Wed May 06, 2015 4:43 am

Re: Spine SNMP v3 SNMP Context

Post by z3t4 »

Bump.
z3t4
Posts: 5
Joined: Wed May 06, 2015 4:43 am

Re: Spine SNMP v3 SNMP Context

Post by z3t4 »

Checking the db schema there is snm_context for host & poller_item, but it is not defined on data_input_fields:
VALUES (1,'92f5906c8dc0f964b41f4253df582c38',1,'SNMP IP Address','management_ip','in','',0,'hostname','','');
INSERT INTO data_input_fields VALUES (2,'32285d5bf16e56c478f5e83f32cda9ef',1,'SNMP Community','snmp_community','in','',0,'snmp_community','','');
INSERT INTO data_input_fields VALUES (3,'ad14ac90641aed388139f6ba86a2e48b',1,'SNMP Username','snmp_username','in','',0,'snmp_username','','on');
INSERT INTO data_input_fields VALUES (4,'9c55a74bd571b4f00a96fd4b793278c6',1,'SNMP Password','snmp_password','in','',0,'snmp_password','','on');
INSERT INTO data_input_fields VALUES (5,'012ccb1d3687d3edb29c002ea66e72da',1,'SNMP Version (1, 2, or 3)','snmp_version','in','',0,'snmp_version','','on');
INSERT INTO data_input_fields VALUES (6,'4276a5ec6e3fe33995129041b1909762',1,'OID','oid','in','',0,'snmp_oid','','');
INSERT INTO data_input_fields VALUES (7,'617cdc8a230615e59f06f361ef6e7728',2,'SNMP IP Address','management_ip','in','',0,'hostname','','');
INSERT INTO data_input_fields VALUES (8,'acb449d1451e8a2a655c2c99d31142c7',2,'SNMP Community','snmp_community','in','',0,'snmp_community','','');
INSERT INTO data_input_fields VALUES (9,'f4facc5e2ca7ebee621f09bc6d9fc792',2,'SNMP Username (v3)','snmp_username','in','',0,'snmp_username','','on');
INSERT INTO data_input_fields VALUES (10,'1cc1493a6781af2c478fa4de971531cf',2,'SNMP Password (v3)','snmp_password','in','',0,'snmp_password','','on');
INSERT INTO data_input_fields VALUES (11,'b5c23f246559df38662c255f4aa21d6b',2,'SNMP Version (1, 2, or 3)','snmp_version','in','',0,'snmp_version','','');
INSERT INTO data_input_fields VALUES (12,'6027a919c7c7731fbe095b6f53ab127b',2,'Index Type','index_type','in','',0,'index_type','','');
INSERT INTO data_input_fields VALUES (13,'cbbe5c1ddfb264a6e5d509ce1c78c95f',2,'Index Value','index_value','in','',0,'index_value','','');
INSERT INTO data_input_fields VALUES (14,'e6deda7be0f391399c5130e7c4a48b28',2,'Output Type ID','output_type','in','',0,'output_type','','');
So...:
INSERT INTO data_input_fields VALUES (47,'5240353b8f7f259acaf30e6229bc14e7',1,'SNMP Context (v3)','snmp_context','in','',0,'snmp_context','','');
INSERT INTO data_input_fields VALUES (48,'135a77685aa01abf1f6e752fe1e3c7f2',2,'SNMP Context (v3)','snmp_context','in','',0,'snmp_context','','');

I deleted the graphs and data sources, recreated them and voila, working like a charm with spine.

It might be a good idea to update the schema with those rows....
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests