Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEriks Sneiders <eriks.sneiders@zabbix.com>2022-06-07 18:06:08 +0300
committerEriks Sneiders <eriks.sneiders@zabbix.com>2022-06-07 21:19:09 +0300
commit4b8e6b21b37de3bce14bc55ca90d6d6cda00ab0b (patch)
tree8061affd0dbea8488e4c35499f770e2dae568749 /templates
parent3eb292b1d902582f4bd0159fb23f206253dc0561 (diff)
...G.....T [ZBXNEXT-6891] removed mongodb implementation, updated template to work with new plugin
* commit 'ef47107f61c50d0c394f2839da9f15b6230e5fff': .......... [ZBXNEXT-6891] added ChangeLog .......... [DEV-2185] updated dependency ...G...... [DEV-2185] code clean up ...G...... [DEV-2185] fixed issues based on PR comments ...G...... [DEV-2185] code clean up ...G...... [DEV-2185] updated plugin versioning support ...G...... [ZBXNEXT-6891] removed support for relative path for Zabbix agent 2 loaded plugins ...G...... [ZBXNEXT-6891] added support for relative path for Zabbix agent 2 loaded plugins .........T [ZBXNEXT-6891] fixed MongoDB templates for new plugin ...G...... [ZBXNEXT-6891] removed mongodb config ...G...... [ZBXNEXT-6891] removed mongodb implementation (cherry picked from commit 4f79b6c67a3ad92b482655d4b7b8a4e7d52c415a)
Diffstat (limited to 'templates')
-rw-r--r--templates/db/mongodb/README.md2
-rw-r--r--templates/db/mongodb/template_db_mongodb.yaml8
-rw-r--r--templates/db/mongodb_cluster/README.md9
-rw-r--r--templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml15
4 files changed, 15 insertions, 19 deletions
diff --git a/templates/db/mongodb/README.md b/templates/db/mongodb/README.md
index 253d8867cf3..154bb2d342a 100644
--- a/templates/db/mongodb/README.md
+++ b/templates/db/mongodb/README.md
@@ -191,7 +191,7 @@ There are no template links in this template.
|----|-----------|----|----|----|
|MongoDB: Connection to MongoDB is unavailable |<p>Connection to MongoDB instance is currently unavailable.</p> |`last(/MongoDB node by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0` |HIGH | |
|MongoDB: Version has changed |<p>MongoDB version has changed. Ack to close.</p> |`last(/MongoDB node by Zabbix agent 2/mongodb.version,#1)<>last(/MongoDB node by Zabbix agent 2/mongodb.version,#2) and length(last(/MongoDB node by Zabbix agent 2/mongodb.version))>0` |INFO |<p>Manual close: YES</p> |
-|MongoDB: has been restarted |<p>Uptime is less than 10 minutes</p> |`last(/MongoDB node by Zabbix agent 2/mongodb.uptime)<10m` |INFO |<p>Manual close: YES</p> |
+|MongoDB: has been restarted |<p>Uptime is less than 10 minutes.</p> |`last(/MongoDB node by Zabbix agent 2/mongodb.uptime)<10m` |INFO |<p>Manual close: YES</p> |
|MongoDB: Failed to fetch info data |<p>Zabbix has not received data for items for the last 10 minutes</p> |`nodata(/MongoDB node by Zabbix agent 2/mongodb.uptime,10m)=1` |WARNING |<p>Manual close: YES</p><p>**Depends on**:</p><p>- MongoDB: Connection to MongoDB is unavailable</p> |
|MongoDB: Total number of open connections is too high |<p>Too few available connections. If MongoDB runs low on connections, in may not be able to handle incoming requests in a timely manner.</p> |`min(/MongoDB node by Zabbix agent 2/mongodb.connections.current,5m)/(last(/MongoDB node by Zabbix agent 2/mongodb.connections.available)+last(/MongoDB node by Zabbix agent 2/mongodb.connections.current))*100>{$MONGODB.CONNS.PCT.USED.MAX.WARN}` |WARNING | |
|MongoDB: Too many cursors opened by MongoDB for clients |<p>-</p> |`min(/MongoDB node by Zabbix agent 2/mongodb.cursor.open.total,5m)>{$MONGODB.CURSOR.OPEN.MAX.WARN}` |WARNING | |
diff --git a/templates/db/mongodb/template_db_mongodb.yaml b/templates/db/mongodb/template_db_mongodb.yaml
index 745a412ac4c..163dbe1b2a4 100644
--- a/templates/db/mongodb/template_db_mongodb.yaml
+++ b/templates/db/mongodb/template_db_mongodb.yaml
@@ -1,6 +1,6 @@
zabbix_export:
version: '6.2'
- date: '2022-04-06T19:59:00Z'
+ date: '2022-05-06T14:09:10Z'
groups:
-
uuid: 748ad4d098d447d492bb935c907f652f
@@ -486,7 +486,7 @@ zabbix_export:
tags:
-
tag: component
- value: documents
+ value: cursors
-
uuid: f23bf716eced4ba5948b06c24c780904
name: 'MongoDB: Cursor: open total'
@@ -692,7 +692,7 @@ zabbix_export:
tags:
-
tag: component
- value: documents
+ value: cursors
-
uuid: ba0502f80a044670993bdb63587cd282
name: 'MongoDB: Bytes in, rate'
@@ -1031,7 +1031,7 @@ zabbix_export:
name: 'MongoDB: has been restarted'
event_name: 'MongoDB: has been restarted (uptime < 10m)'
priority: INFO
- description: 'Uptime is less than 10 minutes'
+ description: 'Uptime is less than 10 minutes.'
manual_close: 'YES'
tags:
-
diff --git a/templates/db/mongodb_cluster/README.md b/templates/db/mongodb_cluster/README.md
index a9ffd1ae3d1..b04a52b2e76 100644
--- a/templates/db/mongodb_cluster/README.md
+++ b/templates/db/mongodb_cluster/README.md
@@ -9,7 +9,6 @@ Most of the metrics are collected in one go, thanks to Zabbix bulk data collecti
`MongoDB cluster by Zabbix agent 2` — collects metrics from mongos proxy(router) by polling zabbix-agent2.
-
This template was tested on:
- MongoDB, version 4.0.21, 4.4.3
@@ -18,7 +17,6 @@ This template was tested on:
> See [Zabbix template operation](https://www.zabbix.com/documentation/6.2/manual/config/templates_out_of_the_box/zabbix_agent2) for basic instructions.
-
1. Setup and configure zabbix-agent2 compiled with the MongoDB monitoring plugin.
2. Set the {$MONGODB.CONNSTRING} such as <protocol(host:port)> or named session of mongos proxy(router).
3. Set the user name and password in host macros ({$MONGODB.USER}, {$MONGODB.PASSWORD}) if you want to override parameters from the Zabbix agent configuration file.
@@ -30,7 +28,6 @@ All sharded Mongodb nodes (mongod) will be discovered with attached template "Mo
Test availability: `zabbix_get -s mongos.node -k 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]"`
-
## Zabbix configuration
No specific Zabbix configuration is required.
@@ -77,7 +74,7 @@ There are no template links in this template.
|MongoDB sharded cluster |MongoDB cluster: Operations: query, rate |<p>The number of queries received the mongos instance per second.</p> |DEPENDENT |mongodb.opcounters.query.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.opcounters.query`</p><p>- CHANGE_PER_SECOND</p> |
|MongoDB sharded cluster |MongoDB cluster: Operations: insert, rate |<p>The number of insert operations received the mongos instance per second.</p> |DEPENDENT |mongodb.opcounters.insert.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.opcounters.insert`</p><p>- CHANGE_PER_SECOND</p> |
|MongoDB sharded cluster |MongoDB cluster: Operations: getmore, rate |<p>"The number of “getmore” operations the mongos per second. This counter can be high even if the query count is low.</p><p>Secondary nodes send getMore operations as part of the replication process."</p> |DEPENDENT |mongodb.opcounters.getmore.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.opcounters.getmore`</p><p>- CHANGE_PER_SECOND</p> |
-|MongoDB sharded cluster |MongoDB cluster: Last seen configserver |<p>The latest optime of the CSRS primary that the mongos has seen.</p> |DEPENDENT |mongodb.last_seen_config_server<p>**Preprocessing**:</p><p>- JAVASCRIPT: `data = JSON.parse(value) return data.sharding.lastSeenConfigServerOpTime.ts/Math.pow(2,32) `</p> |
+|MongoDB sharded cluster |MongoDB cluster: Last seen configserver |<p>The latest optime of the CSRS primary that the mongos has seen.</p> |DEPENDENT |mongodb.last_seen_config_server<p>**Preprocessing**:</p><p>- JSONPATH: `$.sharding.lastSeenConfigServerOpTime.ts.T`</p> |
|MongoDB sharded cluster |MongoDB cluster: Configserver heartbeat |<p>Difference between the latest optime of the CSRS primary that the mongos has seen and cluster time.</p> |DEPENDENT |mongodb.config_server_heartbeat<p>**Preprocessing**:</p><p>- JAVASCRIPT: `The text is too long. Please see the template.`</p> |
|MongoDB sharded cluster |MongoDB cluster: Bytes in, rate |<p>The total number of bytes that the server has received over network connections initiated by clients or other mongod/mongos instances per second.</p> |DEPENDENT |mongodb.network.bytes_in.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.network.bytesIn`</p><p>- CHANGE_PER_SECOND</p> |
|MongoDB sharded cluster |MongoDB cluster: Bytes out, rate |<p>The total number of bytes that the server has sent over network connections initiated by clients or other mongod/mongos instances per second.</p> |DEPENDENT |mongodb.network.bytes_out.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.network.bytesOut`</p><p>- CHANGE_PER_SECOND</p> |
@@ -92,7 +89,7 @@ There are no template links in this template.
|MongoDB sharded cluster |MongoDB cluster: Connection pool: available |<p>The total number of available outgoing connections from the current mongos instance to other members of the sharded cluster.</p> |DEPENDENT |mongodb.connection_pool.available<p>**Preprocessing**:</p><p>- JSONPATH: `$.totalAvailable`</p> |
|MongoDB sharded cluster |MongoDB cluster: Connection pool: in use |<p>Reports the total number of outgoing connections from the current mongos instance to other members of the sharded cluster set that are currently in use.</p> |DEPENDENT |mongodb.connection_pool.in_use<p>**Preprocessing**:</p><p>- JSONPATH: `$.totalInUse`</p> |
|MongoDB sharded cluster |MongoDB cluster: Connection pool: refreshing |<p>Reports the total number of outgoing connections from the current mongos instance to other members of the sharded cluster that are currently being refreshed.</p> |DEPENDENT |mongodb.connection_pool.refreshing<p>**Preprocessing**:</p><p>- JSONPATH: `$.totalRefreshing`</p> |
-|MongoDB sharded cluster |MongoDB cluster: Cursor: open no timeout |<p>Number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.</p> |DEPENDENT |mongodb.metrics.cursor.open.no_timeout<p>**Preprocessing**:</p><p>- JSONPATH: `$.metrics.cursor.open.noTimeout`</p> |
+|MongoDB sharded cluster |MongoDB cluster: Cursor: open no timeout |<p>Number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.</p> |DEPENDENT |mongodb.metrics.cursor.open.no_timeout<p>**Preprocessing**:</p><p>- JSONPATH: `$.metrics.cursor.open.noTimeout`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p> |
|MongoDB sharded cluster |MongoDB cluster: Cursor: open pinned |<p>Number of pinned open cursors.</p> |DEPENDENT |mongodb.cursor.open.pinned<p>**Preprocessing**:</p><p>- JSONPATH: `$.metrics.cursor.open.pinned`</p> |
|MongoDB sharded cluster |MongoDB cluster: Cursor: open total |<p>Number of cursors that MongoDB is maintaining for clients.</p> |DEPENDENT |mongodb.cursor.open.total<p>**Preprocessing**:</p><p>- JSONPATH: `$.metrics.cursor.open.total`</p> |
|MongoDB sharded cluster |MongoDB cluster: Cursor: timed out, rate |<p>Number of cursors that time out, per second.</p> |DEPENDENT |mongodb.cursor.timed_out.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.metrics.cursor.timedOut`</p><p>- CHANGE_PER_SECOND</p> |
@@ -125,7 +122,7 @@ There are no template links in this template.
|----|-----------|----|----|----|
|MongoDB cluster: Connection to mongos proxy is unavailable |<p>Connection to mongos proxy instance is currently unavailable.</p> |`last(/MongoDB cluster by Zabbix agent 2/mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"])=0` |HIGH | |
|MongoDB cluster: Version has changed |<p>MongoDB cluster version has changed. Ack to close.</p> |`last(/MongoDB cluster by Zabbix agent 2/mongodb.version,#1)<>last(/MongoDB cluster by Zabbix agent 2/mongodb.version,#2) and length(last(/MongoDB cluster by Zabbix agent 2/mongodb.version))>0` |INFO |<p>Manual close: YES</p> |
-|MongoDB cluster: has been restarted |<p>Uptime is less than 10 minutes</p> |`last(/MongoDB cluster by Zabbix agent 2/mongodb.uptime)<10m` |INFO |<p>Manual close: YES</p> |
+|MongoDB cluster: has been restarted |<p>Uptime is less than 10 minutes.</p> |`last(/MongoDB cluster by Zabbix agent 2/mongodb.uptime)<10m` |INFO |<p>Manual close: YES</p> |
|MongoDB cluster: Failed to fetch info data |<p>Zabbix has not received data for items for the last 10 minutes</p> |`nodata(/MongoDB cluster by Zabbix agent 2/mongodb.uptime,10m)=1` |WARNING |<p>Manual close: YES</p><p>**Depends on**:</p><p>- MongoDB cluster: Connection to mongos proxy is unavailable</p> |
|MongoDB cluster: Available connections is low |<p>"Too few available connections.</p><p>Consider this value in combination with the value of connections current to understand the connection load on the database"</p> |`max(/MongoDB cluster by Zabbix agent 2/mongodb.connections.available,5m)<{$MONGODB.CONNS.AVAILABLE.MIN.WARN}` |WARNING | |
|MongoDB cluster: Too many cursors opened by MongoDB for clients |<p>-</p> |`min(/MongoDB cluster by Zabbix agent 2/mongodb.cursor.open.total,5m)>{$MONGODB.CURSOR.OPEN.MAX.WARN}` |WARNING | |
diff --git a/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml b/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml
index d234ae28413..bccdf2e192e 100644
--- a/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml
+++ b/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml
@@ -1,6 +1,6 @@
zabbix_export:
version: '6.2'
- date: '2022-04-06T19:59:01Z'
+ date: '2022-05-06T14:17:41Z'
groups:
-
uuid: 748ad4d098d447d492bb935c907f652f
@@ -39,8 +39,8 @@ zabbix_export:
type: JAVASCRIPT
parameters:
- |
- data = JSON.parse(value)
- return (data["$clusterTime"].clusterTime-data.sharding.lastSeenConfigServerOpTime.ts)/Math.pow(2,32);
+ data = JSON.parse(value);
+ return (data["$clusterTime"].clusterTime.T - data.sharding.lastSeenConfigServerOpTime.ts.T);
master_item:
key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
tags:
@@ -388,11 +388,9 @@ zabbix_export:
description: 'The latest optime of the CSRS primary that the mongos has seen.'
preprocessing:
-
- type: JAVASCRIPT
+ type: JSONPATH
parameters:
- - |
- data = JSON.parse(value)
- return data.sharding.lastSeenConfigServerOpTime.ts/Math.pow(2,32)
+ - $.sharding.lastSeenConfigServerOpTime.ts.T
master_item:
key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
tags:
@@ -484,6 +482,7 @@ zabbix_export:
type: JSONPATH
parameters:
- $.metrics.cursor.open.noTimeout
+ error_handler: DISCARD_VALUE
master_item:
key: 'mongodb.server.status["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]'
tags:
@@ -796,7 +795,7 @@ zabbix_export:
name: 'MongoDB cluster: has been restarted'
event_name: 'MongoDB cluster: has been restarted (uptime < 10m)'
priority: INFO
- description: 'Uptime is less than 10 minutes'
+ description: 'Uptime is less than 10 minutes.'
manual_close: 'YES'
tags:
-