diff options
author | Yulia Chukina <yulia.chukina@zabbix.com> | 2021-04-01 13:41:19 +0300 |
---|---|---|
committer | Yulia Chukina <yulia.chukina@zabbix.com> | 2021-04-01 13:41:19 +0300 |
commit | f7234c2830ef95446e0d1c4d68d03ba7489df7ad (patch) | |
tree | c6070f76bcc27dd710f0681abe302ef6d12f24af /templates | |
parent | dbeb54d03ecb161a316820cf5525815347e445c2 (diff) | |
parent | 7d1968a7458b8b0a3504d5051508968d62b14702 (diff) |
.........T [ZBXNEXT-5869] fixed typo and added override for MongoDB templates
* commit '7d1968a7458b8b0a3504d5051508968d62b14702':
.........T [ZBXNEXT-5869] fixed typo and added override
Diffstat (limited to 'templates')
-rw-r--r-- | templates/db/mongodb/README.md | 6 | ||||
-rw-r--r-- | templates/db/mongodb/template_db_mongodb.yaml | 26 | ||||
-rw-r--r-- | templates/db/mongodb_cluster/README.md | 8 | ||||
-rw-r--r-- | templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml | 14 |
4 files changed, 39 insertions, 15 deletions
diff --git a/templates/db/mongodb/README.md b/templates/db/mongodb/README.md index 78948712109..c5f884fafde 100644 --- a/templates/db/mongodb/README.md +++ b/templates/db/mongodb/README.md @@ -23,7 +23,7 @@ This template was tested on: 2. Set the {$MONGODB.CONNSTRING} such as <protocol(host:port)> or named session. 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. -Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. +**Note**, depending on the number of DBs and collections discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. Test availability: `zabbix_get -s mongodb.node -k 'mongodb.ping["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]"` @@ -57,8 +57,8 @@ There are no template links in this template. |Name|Description|Type|Key and additional info| |----|-----------|----|----| -|Database discovery |<p>Collect database metrics.</p> |ZABBIX_PASSIVE |mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p> | -|Collection discovery |<p>Collect collections metrics.</p> |ZABBIX_PASSIVE |mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p><p>- C: {#COLLECTION} MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}`</p><p>- D: {#COLLECTION} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}`</p> | +|Database discovery |<p>Collect database metrics.</p><p>Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}.</p> |ZABBIX_PASSIVE |mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p> | +|Collection discovery |<p>Collect collections metrics.</p><p>Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}.</p> |ZABBIX_PASSIVE |mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p><p>- C: {#COLLECTION} MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}`</p><p>- D: {#COLLECTION} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}`</p> | |Replication discovery |<p>Collect metrics by Zabbix agent if it exists</p> |DEPENDENT |mongodb.rs.discovery<p>**Preprocessing**:</p><p>- JAVASCRIPT: `Text is too long. Please see the template.`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> | |WiredTiger metrics |<p>Collect metrics of WiredTiger Storage Engine if it exists</p> |DEPENDENT |mongodb.wired_tiger.discovery<p>**Preprocessing**:</p><p>- JAVASCRIPT: `return JSON.stringify(JSON.parse(value).wiredTiger ? [{'{#SINGLETON}': ''}] : []);`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `6h`</p> | diff --git a/templates/db/mongodb/template_db_mongodb.yaml b/templates/db/mongodb/template_db_mongodb.yaml index 80f24f56749..52c778dc328 100644 --- a/templates/db/mongodb/template_db_mongodb.yaml +++ b/templates/db/mongodb/template_db_mongodb.yaml @@ -1,6 +1,6 @@ zabbix_export: version: '5.4' - date: '2021-03-16T10:06:21Z' + date: '2021-04-01T10:04:17Z' groups: - name: Templates/Databases @@ -972,7 +972,9 @@ zabbix_export: value: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}' operator: NOT_MATCHES_REGEX formulaid: B - description: 'Collect collections metrics.' + description: | + Collect collections metrics. + Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. item_prototypes: - name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, avg size' @@ -1679,7 +1681,9 @@ zabbix_export: value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}' operator: NOT_MATCHES_REGEX formulaid: B - description: 'Collect database metrics.' + description: | + Collect database metrics. + Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}. item_prototypes: - name: 'MongoDB {#DBNAME}: Collections' @@ -2385,6 +2389,22 @@ zabbix_export: - 1h overrides: - + name: 'Arbiter metrics' + step: '2' + filter: + conditions: + - + macro: '{#NODE_STATE}' + value: '7' + formulaid: A + operations: + - + operationobject: ITEM_PROTOTYPE + operator: LIKE + value: 'Replication lag' + status: ENABLED + discover: NO_DISCOVER + - name: 'Primary metrics' step: '1' filter: diff --git a/templates/db/mongodb_cluster/README.md b/templates/db/mongodb_cluster/README.md index 6a6fc441e17..9bfe83320bd 100644 --- a/templates/db/mongodb_cluster/README.md +++ b/templates/db/mongodb_cluster/README.md @@ -23,7 +23,7 @@ This template was tested on: 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. -Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. +**Note**, depending on the number of DBs and collections discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. All sharded Mongodb nodes (mongod) will be discovered with attached template "MongoDB node by Zabbix Agent 2". @@ -58,8 +58,8 @@ There are no template links in this template. |Name|Description|Type|Key and additional info| |----|-----------|----|----| -|Database discovery |<p>Collect database metrics.</p> |ZABBIX_PASSIVE |mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p> | -|Collection discovery |<p>Collect collections metrics.</p> |ZABBIX_PASSIVE |mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p><p>- C: {#COLLECTION} MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}`</p><p>- D: {#COLLECTION} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}`</p> | +|Database discovery |<p>Collect database metrics.</p><p>Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}.</p> |ZABBIX_PASSIVE |mongodb.db.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p> | +|Collection discovery |<p>Collect collections metrics.</p><p>Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}.</p> |ZABBIX_PASSIVE |mongodb.collections.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"]<p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}`</p><p>- C: {#COLLECTION} MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.MATCHES}`</p><p>- D: {#COLLECTION} NOT_MATCHES_REGEX `{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}`</p> | |Shards discovery |<p>Discovery shared cluster hosts.</p> |ZABBIX_PASSIVE |mongodb.sh.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"] | |Config servers discovery |<p>Discovery shared cluster config servers.</p> |ZABBIX_PASSIVE |mongodb.cfg.discovery["{$MONGODB.CONNSTRING}","{$MONGODB.USER}","{$MONGODB.PASSWORD}"] | @@ -78,7 +78,7 @@ There are no template links in this template. |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 | |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 | |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: Configserver heartbear |<p>Difference between the latest optime of the CSRS primary that the mongos has seen and cluster time.</p> |DEPENDENT |mongodb.config_server_heartbit<p>**Preprocessing**:</p><p>- JAVASCRIPT: `Text is too long. Please see the template.`</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: `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 | |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 | |MongoDB sharded cluster |MongoDB cluster: Requests, rate |<p>Number of distinct requests that the server has received per second</p> |DEPENDENT |mongodb.network.numRequests.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$.network.numRequests`</p><p>- CHANGE_PER_SECOND | diff --git a/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml b/templates/db/mongodb_cluster/template_db_mongodb_cluster.yaml index 8d07be3ff19..6547dca43b0 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: '5.4' - date: '2021-03-16T10:06:52Z' + date: '2021-04-01T10:04:12Z' groups: - name: Templates/Databases @@ -29,9 +29,9 @@ zabbix_export: name: 'Zabbix raw items' items: - - name: 'MongoDB cluster: Configserver heartbear' + name: 'MongoDB cluster: Configserver heartbeat' type: DEPENDENT - key: mongodb.config_server_heartbit + key: mongodb.config_server_heartbeat delay: '0' history: 7d units: s @@ -783,7 +783,9 @@ zabbix_export: value: '{$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}' operator: NOT_MATCHES_REGEX formulaid: B - description: 'Collect collections metrics.' + description: | + Collect collections metrics. + Note, depending on the number of DBs and collections this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.MATCHES}, {$MONGODB.LLD.FILTER.COLLECTION.NOT_MATCHES}. item_prototypes: - name: 'MongoDB {#DBNAME}.{#COLLECTION}: Objects, avg size' @@ -968,7 +970,9 @@ zabbix_export: value: '{$MONGODB.LLD.FILTER.DB.NOT_MATCHES}' operator: NOT_MATCHES_REGEX formulaid: B - description: 'Collect database metrics.' + description: | + Collect database metrics. + Note, depending on the number of DBs this discovery operation may be expensive. Use filters with macros {$MONGODB.LLD.FILTER.DB.MATCHES}, {$MONGODB.LLD.FILTER.DB.NOT_MATCHES}. item_prototypes: - name: 'MongoDB {#DBNAME}: Size, data' |