Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/centreon/centreon-plugins
Browse files Browse the repository at this point in the history
…into MON-34064-package-debian-12
  • Loading branch information
mushroomempires committed Jan 25, 2024
2 parents 3a27c7f + e856a05 commit 931e94c
Show file tree
Hide file tree
Showing 11 changed files with 2,428 additions and 647 deletions.
3 changes: 2 additions & 1 deletion packaging/centreon-plugin-Notification-Email/deb.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"dependencies": [
"libemail-sender-perl",
"libemail-mime-perl"
"libemail-mime-perl",
"libhtml-template-perl"
]
}
3 changes: 2 additions & 1 deletion packaging/centreon-plugin-Notification-Email/rpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dependencies": [
"perl(Email::MIME)",
"perl(Email::Simple)",
"perl(Email::Sender)"
"perl(Email::Sender)",
"perl(HTML::Template)"
]
}
84 changes: 84 additions & 0 deletions src/contrib/collection/snmp/zxtm-pool.json
Original file line number Diff line number Diff line change
@@ -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 changes: 64 additions & 0 deletions src/contrib/collection/snmp/zxtm-virtualserver.json
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 931e94c

Please sign in to comment.