User Tools

Site Tools


maintenance_db_api

Maintenance Database API

The maintenance database query and update service resides on port 5000 of the nagios-compat.drg.lrz.de server. Authentication is done using Grid certificates. Your DN has to be manually added to the grid-mapfile on the server. To test authentication you can execute the following:

curl --cert ~/.globus/certificate:password https://nagios-compat.drg.lrz.de:5000/test

It will return either {“authentication” : “succeeded”} or {“authentication” : “failed”} with HTTP codes 200 and 401 respectively, depending whether you provide a valid certificate.

API Documentation

URL Method Description
/downtime GET Will produce a complete list of current downtimes.
/downtime POST Will add a new scheduled downtime to the database. Return it's id.
/downtime/<id> DELETE Delete the record specified by <id>.
/upcoming GET Will return all upcoming downtimes.
/current_and_upcoming GET Will return current and upcoming downtimes.

Data format

[
    {
        "hostname" : string,
        "start_date" : timestamp,
        "end_date" : timestamp,
        "description" : string
    },
    ...
]

Examples

$ curl --cert certificate:password --data "start_date=1234&end_date=4321&description=abcd" https://nagios-compat.drg.lrz.de:5000/downtime/qcg.inula.man.poznan.pl
maintenance_db_api.txt · Last modified: 2017/09/29 15:30 (external edit)