mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
Documentation: Fix plugin integration path
This commit is contained in:
parent
eb2f2dd8a2
commit
0441e95942
@ -57,7 +57,7 @@ The recommended way of setting up these plugins is to copy them to a common dire
|
|||||||
and create a new global constant, e.g. `CustomPluginDir` in your [constants.conf](4-configuring-icinga-2.md#constants-conf)
|
and create a new global constant, e.g. `CustomPluginDir` in your [constants.conf](4-configuring-icinga-2.md#constants-conf)
|
||||||
configuration file:
|
configuration file:
|
||||||
|
|
||||||
# cp check_snmp_int.pl /opt/plugins
|
# cp check_snmp_int.pl /opt/monitoring/plugins
|
||||||
# chmod +x /opt/plugins/check_snmp_int.pl
|
# chmod +x /opt/plugins/check_snmp_int.pl
|
||||||
|
|
||||||
# cat /etc/icinga2/constants.conf
|
# cat /etc/icinga2/constants.conf
|
||||||
@ -68,13 +68,13 @@ configuration file:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const PluginDir = "/usr/lib/nagios/plugins"
|
const PluginDir = "/usr/lib/nagios/plugins"
|
||||||
const CustomPluginDir = "/opt/monitoring"
|
const CustomPluginDir = "/opt/monitoring/plugins"
|
||||||
|
|
||||||
Prior to using the check plugin with Icinga 2 you should ensure that it is working properly
|
Prior to using the check plugin with Icinga 2 you should ensure that it is working properly
|
||||||
by trying to run it on the console using whichever user Icinga 2 is running as:
|
by trying to run it on the console using whichever user Icinga 2 is running as:
|
||||||
|
|
||||||
# su - icinga -s /bin/bash
|
# su - icinga -s /bin/bash
|
||||||
$ /opt/plugins/check_snmp_int.pl --help
|
$ /opt/monitoring/plugins/check_snmp_int.pl --help
|
||||||
|
|
||||||
Additional libraries may be required for some plugins. Please consult the plugin
|
Additional libraries may be required for some plugins. Please consult the plugin
|
||||||
documentation and/or plugin provided README for installation instructions.
|
documentation and/or plugin provided README for installation instructions.
|
||||||
@ -100,7 +100,7 @@ Example for a custom `my-snmp-int` check command:
|
|||||||
object CheckCommand "my-snmp-int" {
|
object CheckCommand "my-snmp-int" {
|
||||||
import "plugin-check-command"
|
import "plugin-check-command"
|
||||||
|
|
||||||
command = [ PluginDir + "/check_snmp_int.pl" ]
|
command = [ CustomPluginDir + "/check_snmp_int.pl" ]
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-H" = "$snmp_address$"
|
"-H" = "$snmp_address$"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user