{"action":"opened","issue":{"url":"https://api.github.com/repos/sys4/pacemaker-snmp/issues/4","repository_url":"https://api.github.com/repos/sys4/pacemaker-snmp","labels_url":"https://api.github.com/repos/sys4/pacemaker-snmp/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sys4/pacemaker-snmp/issues/4/comments","events_url":"https://api.github.com/repos/sys4/pacemaker-snmp/issues/4/events","html_url":"https://github.com/sys4/pacemaker-snmp/issues/4","id":165050385,"number":4,"title":"Wrong values in sys4PcmkOnlineNodes.0 and sys4PcmkNodeStatus","user":{"login":"RolandFelnhofer","id":12811720,"avatar_url":"https://avatars.githubusercontent.com/u/12811720?v=3","gravatar_id":"","url":"https://api.github.com/users/RolandFelnhofer","html_url":"https://github.com/RolandFelnhofer","followers_url":"https://api.github.com/users/RolandFelnhofer/followers","following_url":"https://api.github.com/users/RolandFelnhofer/following{/other_user}","gists_url":"https://api.github.com/users/RolandFelnhofer/gists{/gist_id}","starred_url":"https://api.github.com/users/RolandFelnhofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RolandFelnhofer/subscriptions","organizations_url":"https://api.github.com/users/RolandFelnhofer/orgs","repos_url":"https://api.github.com/users/RolandFelnhofer/repos","events_url":"https://api.github.com/users/RolandFelnhofer/events{/privacy}","received_events_url":"https://api.github.com/users/RolandFelnhofer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-12T10:57:11Z","updated_at":"2016-07-12T10:57:11Z","closed_at":null,"body":"Hi,\r\nif saw the following issues: \r\nsys4PcmkOnlineNodes.0 always reports 0 (in my case 2 nodes are online and it should report 2)\r\nsys4PcmkNodeStatus for both nodes always reports INTEGER: other(4) where ist should report online.\r\nLooking at the perl code I saw that if I change:\r\n$cibstatus = XMLin ($dummy, ForceArray => [ 'node_state', ] );\r\nto\r\n$cibstatus = XMLin ($dummy, KeyAttr => {node_state => 'uname'}, ForceArray => [ 'node_state',  ] );\r\nIt terminates with the following error: Not a HASH reference at ./pcmk-subagent.pl line 121.\r\nReplacing line 121 temporarily with my $failkey = ''; allows to query some of the values correctly:\r\n\r\nSYS4PACEMAKER-MIB::sys4PcmkTotalNodes.0 = INTEGER: 2\r\nSYS4PACEMAKER-MIB::sys4PcmkOnlineNodes.0 = INTEGER: 2\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeIndex.1 = INTEGER: 1\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeIndex.2 = INTEGER: 2\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeName.1 = STRING: \"XXXW1-S6018\"\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeName.2 = STRING: \"XXXW1-S6017\"\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeId.1 = INTEGER: 1843992964\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeId.2 = INTEGER: 1843992963\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeStatus.1 = INTEGER: unknown(0)\r\nSYS4PACEMAKER-MIB::sys4PcmkNodeStatus.2 = INTEGER: unknown(0)\r\nSYS4PACEMAKER-MIB::sys4PcmkResourcePrimitiveNumber.0 = INTEGER: 2\r\nSYS4PACEMAKER-MIB::sys4PcmkResourceGroupNumber.0 = INTEGER: 0\r\nSYS4PACEMAKER-MIB::sys4PcmkResourceCloneNumber.0 = INTEGER: 2\r\nSYS4PACEMAKER-MIB::sys4PcmkResourceMasterNumber.0 = INTEGER: 0\r\nTimeout: No Response from XXXW1-S6018.elga.net\r\n\r\nChecking the script again shows that it terminates now with following error:\r\nNot a HASH reference at /opt/pacemaker-snmp/pcmk-subagent.pl line 416.\r\n\r\nusing crm 2.2.1 \r\n\r\nAny Idea, hint how to fix the issue?\r\n\r\nBest regards\r\nRoland"}}
{"actor":{"display_login":"RolandFelnhofer"}}