Skip to content

Commit

Permalink
Merge pull request zabbix#83 from Jaxom99/patch-1
Browse files Browse the repository at this point in the history
Update app MQTT page
  • Loading branch information
oscar120584 authored May 6, 2022
2 parents 1e04580 + dbbc4b1 commit 178d91c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONFIG


======================= CUT HERE ================================

```
# Mosquitto monitoring
Expand All @@ -48,7 +48,7 @@ CONFIG
UserParameter=mosquitto[*],/etc/zabbix/scripts/mosquitto \$SYS/broker/$1 2>/dev/null

```

======================= CUT HERE ================================

Expand All @@ -63,13 +63,13 @@ SCRIPT


======================= CUT HERE ================================

```
#!/bin/bash
mosquitto\_sub -C 1 -u USERNAME -P PASSWORD -t "$1"

mosquitto_sub -C 1 -u USERNAME -P PASSWORD -t "$1"
```

======================= CUT HERE ================================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ mosquitto\_sub -C 1 -u USERNAME -P PASSWORD -t "$1"



</description><groups><group><name>Templates</name></group></groups><applications><application><name>MQTT</name></application></applications><items><item><name>MQTT Messages Sent</name><key>mosquitto[/messages/sent]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Disconnected</name><key>mosquitto[clients/disconnected]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Expired</name><key>mosquitto[clients/expired]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Max</name><key>mosquitto[clients/maximum]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Total</name><key>mosquitto[clients/total]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Bytes Received</name><key>mosquitto[load/bytes/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><units>B</units><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Bytes Sent</name><key>mosquitto[load/bytes/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><units>B</units><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Messages Received</name><key>mosquitto[load/messages/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Messages Sent</name><key>mosquitto[load/messages/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Dropped</name><key>mosquitto[load/publish//dropped/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Received</name><key>mosquitto[load/publish/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Sent</name><key>mosquitto[load/publish/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Inflight</name><key>mosquitto[messages/inflight]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Received</name><key>mosquitto[messages/received]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Stored</name><key>mosquitto[messages/stored]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Count Retained</name><key>mosquitto[retained/messages/count]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Count Subscriptions</name><key>mosquitto[subscriptions/count]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item></items></template></templates><graphs><graph><name>MQTT Clients</name><graph_items><graph_item><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[clients/maximum]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[clients/total]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>2774A4</color><item><host>App MQTT Service</host><key>mosquitto[clients/expired]</key></item></graph_item><graph_item><sortorder>3</sortorder><color>A54F10</color><item><host>App MQTT Service</host><key>mosquitto[clients/disconnected]</key></item></graph_item></graph_items></graph><graph><name>MQTT Messages Counts</name><graph_items><graph_item><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[/messages/sent]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>A54F10</color><item><host>App MQTT Service</host><key>mosquitto[messages/inflight]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>3333FF</color><item><host>App MQTT Service</host><key>mosquitto[messages/stored]</key></item></graph_item></graph_items></graph><graph><name>MQTT Messages Stats</name><graph_items><graph_item><sortorder>1</sortorder><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[load/messages/received/5min]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[load/messages/sent/5min]</key></item></graph_item></graph_items></graph><graph><name>MQTT Publish Counts</name><graph_items><graph_item><color>DD0000</color><item><host>App MQTT Service</host><key>mosquitto[load/publish//dropped/5min]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>EEEE00</color><item><host>App MQTT Service</host><key>mosquitto[load/publish/received/5min]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>00DD00</color><item><host>App MQTT Service</host><key>mosquitto[load/publish/sent/5min]</key></item></graph_item></graph_items></graph><graph><name>MQTT Traffic Counts</name><graph_items><graph_item><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[load/bytes/received/5min]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[load/bytes/sent/5min]</key></item></graph_item></graph_items></graph></graphs></zabbix_export>
</description><groups><group><name>Templates</name></group></groups><applications><application><name>MQTT</name></application></applications><items><item><name>MQTT Messages Sent</name><key>mosquitto[messages/sent]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Disconnected</name><key>mosquitto[clients/disconnected]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Expired</name><key>mosquitto[clients/expired]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Max</name><key>mosquitto[clients/maximum]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Clients Total</name><key>mosquitto[clients/total]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Bytes Received</name><key>mosquitto[load/bytes/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><units>B</units><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Bytes Sent</name><key>mosquitto[load/bytes/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><units>B</units><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Messages Received</name><key>mosquitto[load/messages/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT AVG Messages Sent</name><key>mosquitto[load/messages/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Dropped</name><key>mosquitto[load/publish//dropped/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Received</name><key>mosquitto[load/publish/received/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Publish Sent</name><key>mosquitto[load/publish/sent/5min]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Inflight</name><key>mosquitto[messages/inflight]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Received</name><key>mosquitto[messages/received]</key><delay>30</delay><value_type>FLOAT</value_type><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Messages Stored</name><key>mosquitto[messages/stored]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Count Retained</name><key>mosquitto[retained/messages/count]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item><item><name>MQTT Count Subscriptions</name><key>mosquitto[subscriptions/count]</key><delay>30</delay><applications><application><name>MQTT</name></application></applications></item></items></template></templates><graphs><graph><name>MQTT Clients</name><graph_items><graph_item><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[clients/maximum]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[clients/total]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>2774A4</color><item><host>App MQTT Service</host><key>mosquitto[clients/expired]</key></item></graph_item><graph_item><sortorder>3</sortorder><color>A54F10</color><item><host>App MQTT Service</host><key>mosquitto[clients/disconnected]</key></item></graph_item></graph_items></graph><graph><name>MQTT Messages Counts</name><graph_items><graph_item><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[/messages/sent]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>A54F10</color><item><host>App MQTT Service</host><key>mosquitto[messages/inflight]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>3333FF</color><item><host>App MQTT Service</host><key>mosquitto[messages/stored]</key></item></graph_item></graph_items></graph><graph><name>MQTT Messages Stats</name><graph_items><graph_item><sortorder>1</sortorder><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[load/messages/received/5min]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[load/messages/sent/5min]</key></item></graph_item></graph_items></graph><graph><name>MQTT Publish Counts</name><graph_items><graph_item><color>DD0000</color><item><host>App MQTT Service</host><key>mosquitto[load/publish//dropped/5min]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>EEEE00</color><item><host>App MQTT Service</host><key>mosquitto[load/publish/received/5min]</key></item></graph_item><graph_item><sortorder>2</sortorder><color>00DD00</color><item><host>App MQTT Service</host><key>mosquitto[load/publish/sent/5min]</key></item></graph_item></graph_items></graph><graph><name>MQTT Traffic Counts</name><graph_items><graph_item><color>CCCC00</color><item><host>App MQTT Service</host><key>mosquitto[load/bytes/received/5min]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>00CC00</color><item><host>App MQTT Service</host><key>mosquitto[load/bytes/sent/5min]</key></item></graph_item></graph_items></graph></graphs></zabbix_export>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONFIG

======================= CUT HERE ================================


```
# Mosquitto monitoring
Expand All @@ -49,7 +49,7 @@ CONFIG
UserParameter=mosquitto[*],/etc/zabbix/scripts/mosquitto \$SYS/broker/$1 2>/dev/null

```
======================= CUT HERE ================================


Expand All @@ -64,12 +64,12 @@ SCRIPT

======================= CUT HERE ================================


```
#!/bin/bash
mosquitto\_sub -C 1 -u USERNAME -P PASSWORD -t "$1"

mosquitto_sub -C 1 -u USERNAME -P PASSWORD -t "$1"
```

======================= CUT HERE ================================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ zabbix_export:
-
uuid: f4a87381e08749dd8c88ce6148967548
name: 'MQTT Messages Sent'
key: 'mosquitto[/messages/sent]'
key: 'mosquitto[messages/sent]'
delay: '30'
value_type: FLOAT
tags:
Expand Down Expand Up @@ -296,7 +296,7 @@ zabbix_export:
color: 00CC00
item:
host: 'App MQTT Service'
key: 'mosquitto[/messages/sent]'
key: 'mosquitto[messages/sent]'
-
sortorder: '1'
color: A54F10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONFIG


======================= CUT HERE ================================

```
# Mosquitto monitoring
Expand All @@ -49,7 +49,7 @@ CONFIG
UserParameter=mosquitto[*],/etc/zabbix/scripts/mosquitto \$SYS/broker/$1 2>/dev/null

```
======================= CUT HERE ================================


Expand All @@ -64,12 +64,12 @@ SCRIPT

======================= CUT HERE ================================


```
#!/bin/bash
mosquitto\_sub -C 1 -u USERNAME -P PASSWORD -t "$1"

mosquitto_sub -C 1 -u USERNAME -P PASSWORD -t "$1"
```

======================= CUT HERE ================================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ zabbix_export:
-
uuid: f4a87381e08749dd8c88ce6148967548
name: 'MQTT Messages Sent'
key: 'mosquitto[/messages/sent]'
key: 'mosquitto[messages/sent]'
delay: '30'
value_type: FLOAT
tags:
Expand Down Expand Up @@ -296,7 +296,7 @@ zabbix_export:
color: 00CC00
item:
host: 'App MQTT Service'
key: 'mosquitto[/messages/sent]'
key: 'mosquitto[messages/sent]'
-
sortorder: '1'
color: A54F10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,37 +86,35 @@ <h2 id="overview">Overview</h2>

<p>A very simple template+script for monitoring mosquitto.</p>

<p>CONFIG</p>
<h2>CONFIG</h2>

<p>/etc/zabbix/zabbix-agent.d/userparams_mosquitto.conf</p>
<p>On your system, create this first file : /etc/zabbix/zabbix-agent.d/userparams_mosquitto.conf</p>

<p>======================= CUT HERE ================================</p>
<p>======================= File BEGIN ================================</p>

<h1 id="mosquitto-monitoring">Mosquitto monitoring</h1>
<p>#</p> <h1 id="mosquitto-monitoring">Mosquitto monitoring</h1>

<p>#</p>

<h1 id="this-content-is-licensed-gnu-gpl-v2">This content is licensed GNU GPL v2</h1>
<p>#</p><h1 id="this-content-is-licensed-gnu-gpl-v2">This content is licensed GNU GPL v2</h1>

<h1 id="author-guido-rizzi-guidorizzistudiorizzinet">Author: Guido Rizzi (<a href="mailto:[email protected]">[email protected]</a>)</h1>
<p>#</p><h1 id="author-guido-rizzi-guidorizzistudiorizzinet">Author: Guido Rizzi (<a href="mailto:[email protected]">[email protected]</a>)</h1>

<p>#</p>

<p>UserParameter=mosquitto[*],/etc/zabbix/scripts/mosquitto $SYS/broker/$1 2&gt;/dev/null</p>
<p>UserParameter=mosquitto[*],/etc/zabbix/scripts/mosquitto \$SYS/broker/$1 2&gt;/dev/null</p>

<p>======================= CUT HERE ================================</p>
<p>======================= File END ================================</p>

<p>SCRIPT</p>
<h2>SCRIPT</h2>

<p>/etc/zabbix/scripts/mosquitto</p>
<p>and this second file /etc/zabbix/scripts/mosquitto</p>

<p>======================= CUT HERE ================================</p>
<p>======================= File BEGIN ================================</p>

<p>#!/bin/bash</p>

<p>mosquitto_sub -C 1 -u USERNAME -P PASSWORD -t “$1”</p>

<p>======================= CUT HERE ================================</p>
<p>======================= File END ================================</p>

<h2 id="macros-used">Macros used</h2>

Expand Down Expand Up @@ -681,4 +679,4 @@ <h2 id="triggers">Triggers</h2>
</script>
</body>

</html>
</html>

0 comments on commit 178d91c

Please sign in to comment.