{"id":56,"date":"2008-05-16T01:22:43","date_gmt":"2008-05-15T22:22:43","guid":{"rendered":"http:\/\/www.held.org.il\/blog\/?p=56"},"modified":"2008-05-16T01:22:43","modified_gmt":"2008-05-15T22:22:43","slug":"oracle-snmp","status":"publish","type":"post","link":"http:\/\/www.held.org.il\/blog\/2008\/05\/oracle-snmp\/","title":{"rendered":"Oracle SNMP subagent"},"content":{"rendered":"<p>I had to pass through some hell in order to enable some SNMP Oracle functionality (Oracle 10g for Linux).<\/p>\n<p>This post tries to give instructions for configuring Oracle SNMP features; it might be very boring (even for technical hardcore people), I post it mainly for spreading the knowledge. (\"emsubagent\" gives ~70 results in Google!)<\/p>\n<p><!--more--><\/p>\n<p><strong>Oracle SNMP architecture (very shortly)<br \/>\n<\/strong><\/p>\n<p>There are two relevant components:<\/p>\n<ul>\n<li>Master Agent: handles SNMP queries (receives and replies) and sends traps.<br \/>\nAs far as I understand it could be the Linux native snmpd.<\/li>\n<li>Sub Agent: helps the master agent to get info from specific instances. Comes as a part of Oracle database and maybe other Oracle products.<\/li>\n<\/ul>\n<p>So, it probably looks like this:<\/p>\n<p>Some <span style=\"color: #800000;\">SNMP Client<\/span> sends SNMP GET to <span style=\"color: #339966;\">master agent<\/span> -&gt; <span style=\"color: #339966;\">master agent<\/span> queries a relevant <span style=\"color: #3366ff;\">subagent<\/span> -&gt; <span style=\"color: #3366ff;\">subagent<\/span> replies to the <span style=\"color: #339966;\">master agent<\/span> -&gt; <span style=\"color: #339966;\">master agent<\/span> replies the <span style=\"color: #800000;\">SNMP client<\/span>.<\/p>\n<p>Real info can be found <a href=\"http:\/\/download-west.oracle.com\/docs\/cd\/B16240_01\/doc\/em.102\/b16244.pdf\">here<\/a>.<\/p>\n<p><strong>Running the subagent<\/strong><\/p>\n<p>It should be quite simple in theory:<\/p>\n<p>&gt; emctl start subagent<\/p>\n<h4><span style=\"color: #808080;\">Yes, but subagent doesn't really start<\/span><\/h4>\n<p>running \"<em>emctl start subagent<\/em>\" would print \"subagent started\" no matter if it had succeded or failed! This is really lame, no return value checking. Use <em>emctl status subagent<\/em> or <em>ps -fade | grep emsubagent<\/em> for check ing if subagent is up.<\/p>\n<h4><span style=\"color: #808080;\">Steps I've taken to make subagent work:<\/span><\/h4>\n<ol>\n<li>Install the latest patchset. In 10.2.0.1 the <em>emsubagent<\/em> binary was forgotten, apparently (!!!)<\/li>\n<li>If <em>$ORACLE_HOME\/product\/10.2.0\/db_1\/network\/admin\/sqlnet.ora<\/em> doesn't exist, create an empty one; they promised to fix that on 10.2.0.4 though.<\/li>\n<li>Make sure that <em>snmpd<\/em> (the native Linux net-snmp) is running and is well-configured. I had to add the following lines to enable SNMP MUX (port 199) and allow oracle to use it. It doesn't look too secure though:<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\"><em>smuxsocket TCP:199<br \/>\nsmuxpeer SNMPv2-SMI::zeroDotZero<\/em><\/p>\n<p><span style=\"color: #808080;\"><strong>But this is not the end..<\/strong><\/span><\/p>\n<p>I still miss some important knowledge. Currently we're having troubles getting SNMP traps from Oracle on errors; on some cases it doesn't send them until we restart the server.<\/p>\n<p>EVIL.<\/p>\n<p><strong>Update:<\/strong> traps are sent from an inner component called OMS (Oracle Management Serv[ice|ver]?); it works regardless of whether the subagent is running or not.<\/p>\n<p><strong>Update 2: <\/strong><a href=\"http:\/\/download-east.oracle.com\/docs\/cd\/B16240_01\/doc\/em.102\/b16244.pdf\">This<\/a> is probably the best official reference:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to pass through some hell in order to enable some SNMP Oracle functionality (Oracle 10g for Linux). This post tries to give instructions for configuring Oracle SNMP features; it might be very boring (even for technical hardcore people), I post it mainly for spreading the knowledge. (&#8220;emsubagent&#8221; gives ~70 results in Google!)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[38,81,107],"_links":{"self":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/56"}],"collection":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/comments?post=56"}],"version-history":[{"count":0,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/56\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/media?parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/categories?post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/tags?post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}