Exemplo n.º 1
0
def test_downtime_error():
    icinga = icingapy.IcingaClient(host='http://localhost',
                                   username='******',
                                   password='******')
    response = icinga.downtime('localhost', 'Disk Space', {'hours': 1},
                               'until logrotate')
    assert not response
Exemplo n.º 2
0
def test_status():
    icinga = icingapy.IcingaClient(host='http://localhost',
                                   username='******',
                                   password='******')
    response = icinga.status('localhost', 'Current Load')
    assert 'service' in response
    assert 'state' in response
    assert 'info' in response
    assert 'last-check' in response
Exemplo n.º 3
0
def test_summary():
    icinga = icingapy.IcingaClient(host='http://localhost',
                                   username='******',
                                   password='******')
    response = icinga.summary('localhost')
    assert 'Current Load' in response
    assert 'Current Users' in response
    assert 'Disk Space' in response
    assert 'HTTP' in response
    assert 'SSH' in response
    assert 'Total Processes' in response
Exemplo n.º 4
0
def test_status_error():
    icinga = icingapy.IcingaClient(host='http://localhost',
                                   username='******',
                                   password='******')
    response = icinga.status('localhost', 'Current Load')
    assert not response
Exemplo n.º 5
0
def test_summary_error():
    icinga = icingapy.IcingaClient(host='http://localhost',
                                   username='******',
                                   password='******')
    response = icinga.summary('localhost')
    assert not response