diff --git a/doc/7-troubleshooting.md b/doc/7-troubleshooting.md index e9eb142a7..9e5914d1b 100644 --- a/doc/7-troubleshooting.md +++ b/doc/7-troubleshooting.md @@ -80,6 +80,23 @@ Icinga 2 allows you to import templates using the [import](#import) keyword. If contain additional attributes, your objects will automatically inherit them. You can override or modify these attributes in the current object. +The `icinga2-list-objects` tool can be used to list all configuration objects and their +attributes. The tool also shows where each of the attributes was modified: + + # icinga2-list-objects + Object 'apt' of type 'CheckCommand': + * templates = ['apt', 'plugin-check-command'] + % modified in /usr/share/icinga2/include/command-plugins.conf, lines 458:1-462:1 + % modified in /usr/share/icinga2/include/command.conf, lines 34:1-36:1 + * __name = 'apt' + * command = ['/usr/lib/nagios/plugins/check_apt'] + % modified in /usr/share/icinga2/include/command-plugins.conf, lines 461:2-461:39 + * methods + % modified in /usr/share/icinga2/include/command.conf, lines 35:2-35:32 + * execute = 'PluginCheck' + % modified in /usr/share/icinga2/include/command.conf, lines 35:2-35:32 + * type = 'CheckCommand' + [...] ## Where are the check command definitions diff --git a/python/icinga2/commands/list_objects.py b/python/icinga2/commands/list_objects.py index bf8bca3b7..1978a547c 100644 --- a/python/icinga2/commands/list_objects.py +++ b/python/icinga2/commands/list_objects.py @@ -62,6 +62,13 @@ def main(): print obj.format(use_colors) def usage(): - print "Syntax: %s [--color] [file]" % (sys.argv[0]) - print "" + print "Syntax: %s [--help|-h] [--color] [file]" % (sys.argv[0]) print "Displays a list of objects from the specified Icinga 2 objects file." + print "" + print "Arguments:" + print " --help or -h Displays this help message." + print " --color Enables using color codes even if standard output" + print " is not a terminal." + print "" + print "You can specify an alternative path for the Icinga 2 objects file. By" + print "default '" + LocalStateDir + "/cache/icinga2/icinga2.debug' is used."