<commit_before># activemq-nagios-plugin
Nagios Plugins for Monitoring the Apache ActiveMQ Broker.

This is a Nagions Plugin for monitoring ActiveMQ servers written in Python.
It can be configured through various command line parameters and has 3 different modes.

## Requirements (tested with):
- Python 2.7
- nagiosplugin 1.2.2

nagionsplugin is a Python Framework designed for Nagios Plugins written in Python.
It can be installed via ```pip``` with the command ```pip install nagionsplugin```.

## Command line options:
- Run ```./check_activemq.py -h``` to see the full (and up to date) help
- ```--host``` specifies the Hostname
- ```--port``` specifies the Port
- ```--user``` specifies the Username
- ```--pwd``` specifies the Password

## Operation Modes

#### queuesize - check the size of one or more Queues
- Additional parameters:
 - ```-w WARN``` specifies the Warning threshold (default 10)
 - ```-c CRIT``` specifies the Critical threshold (default 100)
 - ```QUEUE``` - specify queue name to check (see additional explanations below)
- If queuesize is called with NO queue paramter then ALL queues are checkes (excluding queues whose name starts with 'ActiveMQ')
- If queuesize is called WITH a queue then this explicit queue name is checked
 - A given queue name can also contain shell-like wildcards like ```*``` and ```?```

#### health - check the overall Health of the broker
 - This mode just checks if the current status of the ```Health``` service is "Good"

#### subscriber
- Additional parameters:
 - ```--cliendId``` specifies a client ID
 - ```--topic``` specifies a topic of the ActiveMQ Broker
 - This mode checks if the specified clientId is a subscriber of the specified topic and raises a Warning if this isn't the case.
 - This mode returns Critical if the given Topic does not exist.

## Examples
- Check the queue size of the queue TEST: ```./check_activemq.py queuesize TEST```
- Check the queue sizes of all queues starting with TEST: ```./check_activemq.py queuesize "TEST*"```
- Check the overall Health of the ActiveMQ Broker: ```./check_activemq.py health```
- Check that ```Spongebob``` is a subscriber of ```BikiniBottom```: ```./check_activemq.py --clientId Spongebob --topic BikiniBottom```<commit_msg>README: Break examples into new line<commit_after># activemq-nagios-plugin
Nagios Plugins for Monitoring the Apache ActiveMQ Broker.

This is a Nagions Plugin for monitoring ActiveMQ servers written in Python.
It can be configured through various command line parameters and has 3 different modes.

## Requirements (tested with):
- Python 2.7
- nagiosplugin 1.2.2

nagionsplugin is a Python Framework designed for Nagios Plugins written in Python.
It can be installed via ```pip``` with the command ```pip install nagionsplugin```.

## Command line options:
- Run ```./check_activemq.py -h``` to see the full (and up to date) help
- ```--host``` specifies the Hostname
- ```--port``` specifies the Port
- ```--user``` specifies the Username
- ```--pwd``` specifies the Password

## Operation Modes

#### queuesize - check the size of one or more Queues
- Additional parameters:
 - ```-w WARN``` specifies the Warning threshold (default 10)
 - ```-c CRIT``` specifies the Critical threshold (default 100)
 - ```QUEUE``` - specify queue name to check (see additional explanations below)
- If queuesize is called with NO queue paramter then ALL queues are checkes (excluding queues whose name starts with 'ActiveMQ')
- If queuesize is called WITH a queue then this explicit queue name is checked
 - A given queue name can also contain shell-like wildcards like ```*``` and ```?```

#### health - check the overall Health of the broker
 - This mode just checks if the current status of the ```Health``` service is "Good"

#### subscriber
- Additional parameters:
 - ```--cliendId``` specifies a client ID
 - ```--topic``` specifies a topic of the ActiveMQ Broker
 - This mode checks if the specified clientId is a subscriber of the specified topic and raises a Warning if this isn't the case.
 - This mode returns Critical if the given Topic does not exist.

## Examples
- Check the queue size of the queue TEST
 - ```./check_activemq.py queuesize TEST```
- Check the queue sizes of all queues starting with TEST
 - ```./check_activemq.py queuesize "TEST*"```
- Check the overall Health of the ActiveMQ Broker
 - ```./check_activemq.py health```
- Check that ```Spongebob``` is a subscriber of ```BikiniBottom```
 - ```./check_activemq.py --clientId Spongebob --topic BikiniBottom```
{'fraction_non_alphanumeric': 0.11243649215816214, 'fraction_numerical': 0.0048597305058537665, 'mean_word_length': 4.168949771689498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '996155', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1221, 'n_words': 608}