mirror of https://github.com/Icinga/icinga2.git
80 lines
3.0 KiB
Plaintext
80 lines
3.0 KiB
Plaintext
/******************************************************************************
|
|
* Icinga 2 *
|
|
* Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or *
|
|
* modify it under the terms of the GNU General Public License *
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
* of the License, or (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the Free Software Foundation *
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
******************************************************************************/
|
|
|
|
object CheckCommand "graphite" {
|
|
command = [ PluginContribDir + "/check_graphite" ]
|
|
|
|
arguments = {
|
|
"-u" = {
|
|
value = "$graphite_url$"
|
|
description = "Target url"
|
|
required = true
|
|
}
|
|
"-m" = {
|
|
value = "$graphite_metric$"
|
|
description = "Metric path string"
|
|
required = true
|
|
}
|
|
"-s" = {
|
|
value = "$graphite_shortname$"
|
|
description = "Metric short name (used for performance data)"
|
|
}
|
|
"-d" = {
|
|
value = "$graphite_duration$"
|
|
description = "Length, in minute of data to parse (default: 5)"
|
|
}
|
|
"-f" = {
|
|
value = "$graphite_function$"
|
|
description = "Function applied to metrics for thresholds (default: average)"
|
|
}
|
|
"-w" = {
|
|
value = "$graphite_warning$"
|
|
description = "Warning threshold"
|
|
required = true
|
|
}
|
|
"-c" = {
|
|
value = "$graphite_critical$"
|
|
description = "Critical threshold"
|
|
required = true
|
|
}
|
|
"-U" = {
|
|
value = "$graphite_units$"
|
|
description = "Adds a text tag to the metric count in the plugin output. Useful to identify the metric units. Doesn't affect data queries."
|
|
}
|
|
"-M" = {
|
|
value = "$graphite_message$"
|
|
description = "Text message to output (default: 'metric count:')"
|
|
}
|
|
"-z" = {
|
|
set_if = "$graphite_zero_on_error$"
|
|
description = "Return 0 on a graphite 500 error"
|
|
}
|
|
"-l" = {
|
|
set_if = "$graphite_link_graph$"
|
|
description = "Add a link in the plugin output, showing a 24h graph for this metric in graphite."
|
|
}
|
|
}
|
|
|
|
vars.graphite_duration = "5"
|
|
vars.graphite_function = "average"
|
|
vars.graphite_message = "metric count:"
|
|
vars.graphite_zero_on_error = false
|
|
vars.graphite_link_graph = false
|
|
}
|