monitoring-plugins icon indicating copy to clipboard operation
monitoring-plugins copied to clipboard

[avelon-tickets: ] Get Avelon Cloud Tickets (Alarms)

Open therapac opened this issue 1 year ago • 0 comments

Describe the solution you'd like

The current tickets (alerts) of your Avelon Cloud are being reviewed, and depending on their status, critical alerts or warnings can be triggered. You need a license to access the public API of the Avelon Cloud.

Additional context

Help:

usage: avelon-tickets [-h] [-V] [--always-ok] --client-id CLIENT_ID --client-secret CLIENT_SECRET [--closed-ticket]
                      [-c [{ACKNOWLEDGED,OPEN} ...]] [--insecure] [--no-proxy] --password PASSWORD --username USERNAME
                      [--test TEST] [--timeout TIMEOUT] [-w [{ACKNOWLEDGED,OPEN} ...]]

The current tickets (alerts) of your Avelon Cloud are being reviewed, and depending on their status, critical alerts
or warnings can be triggered. You need a license to access the public API of the Avelon Cloud.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  --client-id CLIENT_ID
                        Avelon API client_id.
  --client-secret CLIENT_SECRET
                        Avelon API client_secret.
  --closed-ticket       The option allows viewing the closed alarms as well. Default: False
  -c [{ACKNOWLEDGED,OPEN} ...], --critical [{ACKNOWLEDGED,OPEN} ...]
                        Set the CRIT threshold as a status of the ticket (alarm). Default: >= []
  --insecure            This option explicitly allows to perform "insecure" SSL connections. Default: False
  --no-proxy            Do not use a proxy. Default: False
  --password PASSWORD   Avelon Cloud password.
  --username USERNAME   Avelon Cloud username.
  --test TEST           For unit tests. Needs "path-to-stdout-file,path-to-stderr-file,expected-retc".
  --timeout TIMEOUT     Network timeout in seconds. Default: 8 (seconds)
  -w [{ACKNOWLEDGED,OPEN} ...], --warning [{ACKNOWLEDGED,OPEN} ...]
                        Set the WARN threshold as a status of the ticket (alarm). Default: >= ['ACKNOWLEDGED', 'OPEN']

Output:

There are CRITICAL alarm ticket(s).

ID       ! Timestamp                        ! Message                                                     ! State
---------+----------------------------------+-------------------------------------------------------------+-------------------------
13927572 ! 2024-06-18 19:46:56 (5D 14h ago) ! Abschaltend: 6102/5/22: Durchfluss Notkühlung FQ201 Störung ! OPEN [CRITICAL]
13927573 ! 2024-06-18 19:46:56 (5D 14h ago) ! Störung: 6102/5/0: Anlage Zustand Störung                   ! ACKNOWLEDGED [CRITICAL]

therapac avatar Jun 25 '24 13:06 therapac