diff --git a/README.md b/README.md index 958de8c..2b61f75 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,5 @@ PROCESS = "" [output] filename = "index.html" +host_order = [ "host1", "host2", "host4" ] ``` diff --git a/service.py b/service.py index 19aea1f..e5b424c 100755 --- a/service.py +++ b/service.py @@ -91,6 +91,13 @@ class StatusPage: host_names.add(service['attrs']['host_name']) # render html for each host_name html_output = "" + for host in self.config['output']['host_order']: + try: + host_names.remove(host) + except KeyError: + pass + else: + html_output = html_output + self.render_services_per_host(host) for host in sorted(host_names): html_output = html_output + self.render_services_per_host(host) return html_output