mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Merge pull request #5914 from Icinga/fix/itl-check-mongodb-5817
Fix for wrong attribute in ITL mongodb CheckCommand
This commit is contained in:
commit
ecc04807dd
@ -618,7 +618,7 @@ object CheckCommand "mongodb" {
|
|||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-H" = {
|
"-H" = {
|
||||||
value = "$mongodb_address$"
|
value = "$mongodb_host$"
|
||||||
description = "The hostname you want to connect to"
|
description = "The hostname you want to connect to"
|
||||||
}
|
}
|
||||||
"-P" = {
|
"-P" = {
|
||||||
@ -688,7 +688,18 @@ object CheckCommand "mongodb" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.mongodb_address = "$check_address$"
|
vars.mongodb_host = {{
|
||||||
|
var mongodbAddress = macro("$mongodb_address$")
|
||||||
|
var checkAddress = macro("$check_address$")
|
||||||
|
|
||||||
|
if (mongodbAddress) {
|
||||||
|
log(LogWarning, "CheckerComponent", "The attribute 'mongodb_address' is deprecated, use 'mongodb_host' instead.")
|
||||||
|
return mongodbAddress
|
||||||
|
} else {
|
||||||
|
return checkAddress
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
vars.mongodb_perfdata = true
|
vars.mongodb_perfdata = true
|
||||||
vars.mongodb_action = "connections"
|
vars.mongodb_action = "connections"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user