]> granicus.if.org Git - icinga2/commitdiff
Update documentation for icinga2-list-objects
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 19 Aug 2014 08:49:20 +0000 (10:49 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 19 Aug 2014 08:49:20 +0000 (10:49 +0200)
fixes #6949

doc/7-troubleshooting.md
python/icinga2/commands/list_objects.py

index e9eb142a73ff3d9caec2e167e2ad4180b353b46c..9e5914d1b3c29198dd24ed6d1b3afd3149074970 100644 (file)
@@ -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'
+    [...]
 
 ## <a id="check-command-definitions"></a> Where are the check command definitions
 
index bf8bca3b70fd2b568ecd413112ad10f263814cc8..1978a547c4f4d96bf16c36e7b5df76b7bd252e2e 100644 (file)
@@ -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."