Skip to content
Snippets Groups Projects
Commit 0eabd59f authored by Erik Reid's avatar Erik Reid
Browse files

added cli doc

parent fc6c3150
Branches
Tags
No related merge requests found
"""
This script queries Inventory Provider for changes
and configures Sensu with the snmp polling checks
required by BRIAN.
.. code-block:: console
% python brian_polling_manager/cli.py --help
Usage: cli.py [OPTIONS]
Update BRIAN snmp checks based on Inventory Provider data.
Options:
--config TEXT configuration filename
--force / --no-force update even if inventory hasn't been updated
--help Show this message and exit.
The required configuration file must be
formatted according to the following schema:
.. asjson::
brian_polling_manager.cli.CONFIG_SCHEMA
"""
import json import json
import logging import logging
import os import os
...@@ -194,6 +219,9 @@ def _validate_config(ctx, param, value): ...@@ -194,6 +219,9 @@ def _validate_config(ctx, param, value):
default=False, default=False,
help="update even if inventory hasn't been updated") help="update even if inventory hasn't been updated")
def main(config, force): def main(config, force):
"""
Update BRIAN snmp checks based on Inventory Provider data.
"""
state = State(config['statedir']) state = State(config['statedir'])
last = inventory.last_update_timestamp(config['inventory']) last = inventory.last_update_timestamp(config['inventory'])
......
cli
===================================================
.. automodule:: brian_polling_manager.cli
...@@ -3,18 +3,17 @@ ...@@ -3,18 +3,17 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to BRIAN Polling Manager's documentation!
=================================================
.. toctree:: BRIAN Polling Manager
:maxdepth: 2 ======================
:caption: Contents:
Documentation for BRIAN Polling Manager.
This application queries Inventory Provider and configures
Sensu checks for polling the data required by BRIAN.
Indices and tables .. toctree::
================== :maxdepth: 2
:caption: Contents:
* :ref:`genindex` cli
* :ref:`modindex`
* :ref:`search`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment