Changeset 14154 in genesis for tools/gformat.py


Ignore:
Timestamp:
May 1, 2018, 1:36:18 PM (7 years ago)
Author:
rick
Message:

Add smokeping configuration exporter for gateway monitoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r14093 r14154  
    19191919              VALUES ((SELECT id FROM nodes WHERE name = '%(nodename)s'), 'ap',
    19201920              '%(ssid)s', 'IEEE 802.11b', %(channel)s, 'active');""" % ifacedump
     1921    elif sys.argv[1] == "smokeping-export":
     1922        for host in get_hostlist():
     1923            datadump = get_yaml(host)
     1924            if datadump.get('service_proxy_normal', False) or datadump.get('service_proxy_ileiden', False):
     1925                print textwrap.dedent("""\
     1926                    ++ wleiden-gw-%(nodename)s
     1927                    menu = %(nodename)s.gw
     1928                    title = Wireless Leiden gateway %(nodename)s.gw.wleiden.net.
     1929                    host = %(nodename)s.gw.wleiden.net.
     1930                    """ % datadump)
    19211931    elif sys.argv[1] == "nagios-export":
    19221932      try:
Note: See TracChangeset for help on using the changeset viewer.