mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 06:35:38 +02:00
Enh collection zxtm pool (#4634)
This commit is contained in:
parent
6e9383635c
commit
e856a05984
84
src/contrib/collection/snmp/zxtm-pool.json
Normal file
84
src/contrib/collection/snmp/zxtm-pool.json
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"constants": {
|
||||||
|
"okState": "active",
|
||||||
|
"criticalState": "disabled",
|
||||||
|
"criticalConnSecond": null,
|
||||||
|
"criticalCurrConn": null
|
||||||
|
},
|
||||||
|
"mapping": {
|
||||||
|
"poolState": {
|
||||||
|
"1": "active",
|
||||||
|
"2": "disabled",
|
||||||
|
"3": "draining",
|
||||||
|
"4": "unused",
|
||||||
|
"5": "unknown"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"snmp": {
|
||||||
|
"tables": [
|
||||||
|
{
|
||||||
|
"name": "poolEntry",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.3.2.1",
|
||||||
|
"used_instance": "\\.1\\.3\\.6\\.1\\.4\\.1\\.7146\\.1\\.2\\.3\\.2\\.1\\.\\d+\\.(\\d+(\\.\\d+)+)",
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"name": "poolName",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.3.2.1.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "poolState",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.3.2.1.14",
|
||||||
|
"map": "poolState"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "poolTotalConn",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.3.2.1.10",
|
||||||
|
"sampling": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "poolCurrentConn",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.3.2.1.48"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"selection_loop": [
|
||||||
|
{
|
||||||
|
"name": "Pool ZXTM",
|
||||||
|
"source": "%(snmp.tables.poolEntry)",
|
||||||
|
"expand_table": {
|
||||||
|
"poolEntry": "%(snmp.tables.poolEntry.[%(poolEntry.instance)])"
|
||||||
|
},
|
||||||
|
"critical": "%(poolEntry.poolState) =~ /%(constants.criticalState)/ or (defined(%(constants.criticalConnSecond)) and %(poolEntry.poolTotalConnPerSeconds) >= %(constants.criticalConnSecond)) or (defined(%(constants.criticalCurrConn)) and %(poolEntry.poolCurrentConn) >= %(constants.criticalCurrConn))",
|
||||||
|
"perfdatas": [
|
||||||
|
{
|
||||||
|
"nlabel": "connS",
|
||||||
|
"instances": ["%(poolEntry.poolName)"],
|
||||||
|
"value": "%(poolEntry.poolTotalConnPerSeconds)",
|
||||||
|
"critical": "%(constants.criticalConnSecond)",
|
||||||
|
"unit": "conn/s",
|
||||||
|
"min": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nlabel": "conn",
|
||||||
|
"instances": ["%(poolEntry.poolName)"],
|
||||||
|
"value": "%(poolEntry.poolCurrentConn)",
|
||||||
|
"critical": "%(constants.criticalConn)",
|
||||||
|
"unit": "conn",
|
||||||
|
"min": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"formatting": {
|
||||||
|
"printf_msg": "Device '%s' state is '%s', current connetions are '%d', with conn/s '%.2f'",
|
||||||
|
"printf_var": [
|
||||||
|
"%(poolEntry.poolName)",
|
||||||
|
"%(poolEntry.poolState)",
|
||||||
|
"%(poolEntry.poolCurrentConn)",
|
||||||
|
"%(poolEntry.poolTotalConnPerSeconds)"
|
||||||
|
],
|
||||||
|
"display_ok": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
64
src/contrib/collection/snmp/zxtm-virtualserver.json
Normal file
64
src/contrib/collection/snmp/zxtm-virtualserver.json
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"constants": {
|
||||||
|
"criticalCurrConn": null
|
||||||
|
},
|
||||||
|
"mapping": {
|
||||||
|
},
|
||||||
|
"snmp": {
|
||||||
|
"tables": [
|
||||||
|
{
|
||||||
|
"name": "virtualserverEntry",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.2.2.1",
|
||||||
|
"used_instance": "\\.1\\.3\\.6\\.1\\.4\\.1\\.7146\\.1\\.2\\.2\\.2\\.1\\.\\d+\\.(\\d+(\\.\\d+)+)",
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"name": "virtualserverName",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.2.2.1.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "virtualserverCurrentConn",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.2.2.1.9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "virtualServerMaxConnections",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.2.2.1.10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "virtualserverTotalHTTPRequests",
|
||||||
|
"oid": ".1.3.6.1.4.1.7146.1.2.2.2.1.43"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"selection_loop": [
|
||||||
|
{
|
||||||
|
"name": "Virtual Server ZXTM",
|
||||||
|
"source": "%(snmp.tables.virtualserverEntry)",
|
||||||
|
"expand_table": {
|
||||||
|
"virtualserverEntry": "%(snmp.tables.virtualserverEntry.[%(virtualserverEntry.instance)])"
|
||||||
|
},
|
||||||
|
"critical": "defined(%(constants.criticalCurrConn)) and %(virtualserverEntry.virtualserverCurrentConn) >= %(constants.criticalCurrConn)",
|
||||||
|
"perfdatas": [
|
||||||
|
{
|
||||||
|
"nlabel": "conn",
|
||||||
|
"instances": ["%(virtualserverEntry.virtualserverName)"],
|
||||||
|
"value": "%(virtualserverEntry.virtualserverCurrentConn)",
|
||||||
|
"critical": "%(constants.criticalConn)",
|
||||||
|
"unit": "conn",
|
||||||
|
"min": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"formatting": {
|
||||||
|
"printf_msg": "Device '%s' current connections are '%d', max connections are '%d', total HTTP requests are '%d'",
|
||||||
|
"printf_var": [
|
||||||
|
"%(virtualserverEntry.virtualserverName)",
|
||||||
|
"%(virtualserverEntry.virtualserverCurrentConn)",
|
||||||
|
"%(virtualserverEntry.virtualServerMaxConnections)",
|
||||||
|
"%(virtualserverEntry.virtualserverTotalHTTPRequests)"
|
||||||
|
],
|
||||||
|
"display_ok": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user