Repository navigation
NMS-11035: Monitor reference docs - #8997
joseanesONMS wants to merge 12 commits into
Conversation
The JschSshMonitor is still registered on develop but had no reference page. It is a deprecated wrapper around SshMonitor (JschSshMonitor.java delegates every poll), so the page lists the SshMonitor parameters and points to it.
The LaTableMonitor is registered on develop but had no reference page. The page follows LaTableMonitor.java: it walks laErrorFlag in the UCD-SNMP-MIB laTable and only reads the port, retry/retries, and timeout overrides.
The LogMatchTableMonitor is registered on develop but had no reference page. The page follows LogMatchTableMonitor.java: it walks logMatchErrorFlag in the UCD-SNMP-MIB logMatchTable and only reads the port, retry/retries, and timeout overrides.
The banner parameter said "regular expression" without naming the flavour or how it is applied. SshMonitor.java compiles banner/match with java.util.regex.Pattern and calls find() on the server banner line, so the page now says so and gives tested examples.
…olokiaBeanMonitor, and WebMonitor The three pages had no complete service and monitor definition to copy from. Examples follow the monitor classes and the shipped poller-configuration.xml; the WebMonitor header and response-text rows are corrected to match WebMonitor.java.
DeviceConfigMonitor.poll falls back to DeviceConfigConstants.DEFAULT_CRON_SCHEDULE (0 0 0 * * ?) when the schedule parameter is absent; never is only the value the shipped poller-configuration.xml sets.
These monitors loop while TimeoutTracker.shouldRetry() returns m_attempt <= m_retry, so retry counts the extra attempts after the first one, not the total number of attempts.
Listing blocks do not apply attribute substitution, so the backslash in $\{ipaddr} rendered literally in the JolokiaBeanMonitor, CiscoPingMibMonitor, MailTransportMonitor, SystemExecuteMonitor, and DNSResolutionMonitor examples.
The DNSResolutionMonitor example now uses {nodeLabel}, the case-sensitive token ParameterSubstitutingMonitor recognizes.
marshallmassengill
left a comment
There was a problem hiding this comment.
First pass:
The JschSshMonitor.adoc page documents a class that OpenNMS cannot load. The class is not registered as a service monitor on the develop branch. The poller cannot find it. We should just remove this I think? That or fix it but I'd vote for removal I think.
The LogMatchTableMonitor.adoc page says that the monitor finds log matches. This is not correct. The Net-SNMP agent sets logMatchErrorFlag to 1 only when a logmatch line is not valid. A log match does not set the flag. Change the introduction and the example text to say that the monitor checks the configuration of the logmatch lines.
The LaTableMonitor.adoc page says that the agent sets the flag when the load "crossed" the threshold. The agent sets the flag when the load is equal to or more than the threshold. Change "crossed" to "reached or crossed".
The SshMonitor.adoc banner section does not include one result. When the server opens the connection and then closes it before it sends a banner, the monitor reports the service as down. The reason is "server closed connection before banner was received". Add one sentence for this result.
JschSshMonitor is listed in neither META-INF/services/org.opennms.netmgt.poller.ServiceMonitor nor the monitors blueprint, so the poller cannot load it; a page for it would document a monitor nobody can configure. The nav entry and the SshMonitor cross-reference go with it.
…check The UCD-SNMP-MIB defines logMatchErrorFlag as "is this line configured correctly?": Net-SNMP sets it to 1 only for a logmatch line that is not valid, never because the log file matched. The introduction and the example now say the monitor checks the logmatch configuration.
…shold Net-SNMP sets laErrorFlag when a load average is equal to or above the configured threshold, not only above it. The MIB description stays quoted verbatim, with the precise rule stated after it.
With banner matching enabled, SshMonitor.poll returns unavailable with "server closed connection before banner was received." when the server closes the connection before sending a banner.
|
@marshallmassengill Thanks, all four addressed:
|
| The LogMatchTableMonitor tests the link:http://www.net-snmp.org/docs/mibs/ucdavis.html#logMatchTable[logMatchTable] of a Net-SNMP agent. | ||
| The agent populates this table from the `logmatch` directives in its `snmpd.conf` file, each of which watches a log file for a regular expression. | ||
|
|
||
| The monitor checks that these `logmatch` lines are configured correctly; it does not report log matches. |
There was a problem hiding this comment.
Well that's pretty useless, then.
Documents the poller monitor reference pages, split out of #8984; content checked against the code on develop, one commit per ticket.
reference/…/monitors/LaTableMonitor.adoc(new)…/monitors/LaTableMonitor.java,SnmpMonitorStrategy.javareference/…/monitors/LogMatchTableMonitor.adoc(new)…/monitors/LogMatchTableMonitor.javareference/…/monitors/SshMonitor.adoc…/monitors/SshMonitor.javaDeviceConfigMonitor.adoc,JolokiaBeanMonitor.adoc,WebMonitor.adocfeatures/device-config/monitor/…/DeviceConfigMonitor.java,JolokiaBeanMonitor.java,WebMonitor.javaThe wrong
WebMonitorparameter rows are also corrected.Corrections to existing docs (separate
NMS-11035: Fix …commits, each can be dropped on its own)scheduledefault is daily at midnight,neveris the shipped valueDeviceConfigMonitor.java,DeviceConfigConstants.javaretryTimeoutTracker.shouldRetry()$\{…}backslashes in source blocks; DNSResolution{nodeLabel}caseParameterSubstitutingMonitor.javaNot addressed
META-INF/servicesor the blueprint), so the poller cannot load it; its page was dropped in review.The docs build adds no warnings (develop's two existing ones remain).
External References