/etc/tkmon/service-catalogues zu finden → dort sind entsprechende Beispiele für die JSON FilesDie Idee ist, das nicht pro Plugin eine Service-Katalog-Datei beschrieben wird, sondern es so allgemein gehalten wird das, das im Service-Kataloge zwei Felder zur Verfügung stehen. In einem Feld wird das Plugin, welches hinterlegt wurde, eingetragen. Im zweiten Feld werden die Kommando-Schalter übergeben. Somit spart man sich den Aufwand für jedes Plugin eine entsprechende Servicebeschreibung zu hinterlegen.
{
"type": "service",
"version": "1.0",
"description": "Services catalogue for plugins",
"data": [
{
"service_description": "check-plugin-exec",
"display_name": "check plugin exec",
"check_command": {
"command_name": "check_plugin_exec_1arg",
"arguments": [
{
"label": "command",
"description": "Name of plugin in plugin folder",
"validation": "string",
"argument": ""
},{
"label": "options",
"description": "Options for the commands",
"validation": "string",
"argument": ""
}
]
},
"_catalogue_attributes": {
"tags": ["local","command","exec", "plugin", "linux", "windows"],
"name": "check_plugin_exec",
"label": "check plugin exec",
"description": "Checks the status of a service check defined on a host with plugin from plugin folder.",
"defined": true,
"defined_in": "/etc/nagios-plugins/config/check_plugin_exec.cfg"
}
}
]
}
Das ganze sieht dann wie folgt aus.