<commit_before>=== AvailabilityMonitor

This monitor tests reachability of a node by using the _isReachable_ method of the InetAddress java class.
The service is considered available if isReachable returns true.
See link:http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#isReachable%28int%29[Oracle's documentation]] for more details.

==== Monitor facts

[options="autowidth"]
|===
| Class Name     | `org.opennms.netmgt.poller.monitors.AvailabilityMonitor`
| Remote Enabled | true
|===

==== Configuration and Usage

.Monitor specific parameters for the AvailabilityMonitor
[options="header, autowidth"]
|===
| Parameter | Description                                                       | Required | Default value
| `retry`   | Number of attempts to have the isReachable method return _true_.  | optional | `3`
| `timeout` | Timeout for the isReachable method, in milliseconds.              | optional | `3000`
|===

==== Examples
[source, xml]

----
<service name="isReachable" interval="300000" user-defined="false" status="on">
</service>

<monitor service="isReachable" class-name="org.opennms.netmgt.poller.monitors.AvailabilityMonitor"/>
----
<commit_msg>NMS-6638: Added info about remote poller + implemented some improvement requested in https://github.com/OpenNMS/opennms/pull/62<commit_after>=== AvailabilityMonitor

This monitor tests reachability of a node by using the _isReachable_ method of the _InetAddress_ java class.
The service is considered available if isReachable returns true.
See link:http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#isReachable%28int%29[Oracle's documentation] for more details.

==== Monitor facts

[options="autowidth"]
|===
| Class Name     | `org.opennms.netmgt.poller.monitors.AvailabilityMonitor`
| Remote Enabled | true
|===

==== Configuration and Usage

.Monitor specific parameters for the AvailabilityMonitor
[options="header, autowidth"]
|===
| Parameter | Description                                                         | Required | Default value
| `retry`   | Number of attempts to have the _isReachable_ method return _true_.  | optional | `3`
| `timeout` | Timeout for the isReachable method, in milliseconds.                | optional | `3000`
|===

==== Examples
[source, xml]

----
<service name="isReachable" interval="300000" user-defined="false" status="on">
  <parameter key="retry" value="2"/>
  <parameter key="timeout" value="5000"/>
</service>

<monitor service="isReachable" class-name="org.opennms.netmgt.poller.monitors.AvailabilityMonitor"/>
----

==== IcmpMonitor vs AvailabilityMonitor
This monitor is intended to run on the OpenNMS Remote Poller.
The OpenNMS Remote Poller has no possibilities to send ICMP messages from a raw socket like OpenNMS has with the JICMP extension.
To have an easy to use and platform independent remote poller as a single runnable jar the AvailabilityMonitor can be used to test network availability from remote locations.

{'fraction_non_alphanumeric': 0.11137281292059219, 'fraction_numerical': 0.014468371467025572, 'mean_word_length': 4.0561224489795915, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3230169', 'n_tokens_mistral': 862, 'n_tokens_neox': 824, 'n_words': 269}