Messages in the error log
Messages in the error log can help isolate syntax problems with get and set commands.
The nco_http utility makes extensive entries in the log file (mttrapd.log) indicating the progress of each operation.
For example, here are a sample set of messages for a get command:
2012-11-15T13:58:06: Debug: D-NHT-105-002: [HTTP Listener]: Connection from
'test28.example.com' (9.180.210.223) on socket '16'.
2012-11-15T13:58:06: Debug: D-NHT-105-008: [HTTP Listener]: Data available
from 'test28.example.com' (9.180.210.223) on socket '16'.
2012-11-15T13:58:06: Debug: D-NHT-105-009: [WorkPoolThread]: Received HTTP
request from 'test28.example.com' (9.180.210.223) on socket '16'.
2012-11-15T13:58:06: Information: I-UNK-000-000: Property NHttpd.BasicAuth
is empty, allowing connection with no authentication
2012-11-15T13:58:06: Information: I-UNK-000-000: HTTP: POST: /probe/common
request from auth=none host=[9.180.210.223]
2012-11-15T13:58:06: Debug: D-UNK-000-000: Received SNMPGET request
2012-11-15T13:58:06: Debug: D-UNK-000-000: Calling snmpget
2012-11-15T13:58:06: Debug: D-UNK-000-000: Return value : Router 1
2012-11-15T13:58:06: Debug: D-UNK-000-000: Rules file processing took
2323 usec.
2012-11-15T13:58:06: Debug: D-UNK-000-000: Flushing events to object servers
2012-11-15T13:58:07: Debug: D-NHT-105-001: [HTTP Listener]:
Disconnection from 'test28.example.com' (9.180.210.223) on socket '16'.
For SNMPGET and SNMPGET_P operations, some of these messages can indicate that there are problems with the syntax of the nco_http command. When a command completes successfully, the log file includes messages similar to the following example:
2012-11-15T13:58:06: Debug: D-UNK-000-000: Received SNMPGET request
2012-11-15T13:58:06: Debug: D-UNK-000-000: Calling snmpget
2012-11-15T13:58:06: Debug: D-UNK-000-000: Return value : Router 1
2012-11-15T13:58:06: Debug: D-UNK-000-000: Rules file processing took 2323 usec.Note that the returned value is filled in with the data retrieved from the target.
If there is an error in the command syntax, however, that segment of messages is similar to the following example:
2012-11-15T15:28:52: Debug: D-UNK-000-000: Received SNMPGET_P request
2012-11-15T15:28:52: Debug: D-UNK-000-000: Calling snmpget_p
2012-11-15T15:28:52: Error: E-P_M-102-000: snmpget: (noSuchName) There is no such
variable name in this MIB.
2012-11-15T15:28:52: Debug: D-UNK-000-000: Return value :
2012-11-15T15:28:52: Debug: D-UNK-000-000: Rules file processing took 1677 usec.In this case, the returned value is blank and the message immediately before that indicates the type of error. In this example, the value of the -oid option is incorrect.