Skip to content

maintenance_info

lucasheld edited this page Aug 29, 2023 · 7 revisions

lucasheld.uptime_kuma.maintenance_info module -- Retrieves facts about maintenances.

Note

This module is part of the lucasheld.uptime_kuma collection (version 1.2.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install lucasheld.uptime_kuma.

To use it in a playbook, specify: lucasheld.uptime_kuma.maintenance_info.

  • Retrieves facts about maintenances.

The below requirements are needed on the host that executes this module.

  • uptime-kuma-api

Parameter

Comments

api_headers

dictionary

Headers that are passed to the socketio connection.

api_password

string

The Uptime Kuma password.

Only required if no api_token specified and authentication is enabled.

api_ssl_verify

boolean

true to verify SSL certificates, or false to skip SSL certificate verification,

allowing connections to servers with self signed certificates.

Choices:

  • no

  • yes ← (default)

api_timeout

float

How many seconds the client should wait for the connection, an expected event or a server response.

Default: 10

api_token

string

The Uptime Kuma login token.

Only required if no api_username and api_password specified and authentication is enabled.

api_url

string

The Uptime Kuma URL.

Default: "http://127.0.0.1:3001"

api_username

string

The Uptime Kuma username.

Only required if no api_token specified and authentication is enabled.

api_wait_events

float

How many seconds the client should wait for the next event of the same type.

There is no way to determine when the last message of a certain type has arrived. Therefore, a timeout is required.

If no further message has arrived within this time, it is assumed that it was the last message.

Default: 0.2

id

integer

The id of the maintenance to inspect.

Only required if no title specified.

title

string

The name of the maintenance to inspect.

Only required if no id specified.

- name: get all maintenances
  lucasheld.uptime_kuma.maintenance_info:
    api_url: http://127.0.0.1:3001
    api_username: admin
    api_password: secret123
  register: result

Key

Description

maintenances

complex

The maintenances as list

Returned: always

active

boolean

True if the maintenance is active.

Returned: always

Sample: true

cron

string

The cron schedule of the maintenance.

Returned: always

Sample: "None"

dateRange

list / elements=string

The date range of the maintenance.

Returned: always

Sample: ["2022-12-27 15:39:00", "2022-12-30 15:39:00"]

daysOfMonth

list / elements=string

The days of month of the maintenance.

Returned: always

Sample: []

description

string

The description of the maintenance.

Returned: always

Sample: "description"

duration

integer

The duration (in seconds) of the maintenance.

Returned: always

Sample: "None"

durationMinutes

integer

The duration (in minutes) of the maintenance.

Returned: always

Sample: 0

id

integer

The id of the maintenance.

Returned: always

Sample: 1

intervalDay

integer

The interval day of the maintenance.

Returned: always

Sample: 1

monitors

list / elements=string

The monitors of the maintenance.

Returned: If id or title specified.

Sample: [{"id": 1}]

status

string

The status of the maintenance.

Returned: always

Sample: "under-maintenance"

status_pages

list / elements=string

The status pages of the maintenance.

Returned: If id or title specified.

Sample: [{"id": 1, "title": "status page 1"}]

strategy

string

The strategy of the maintenance.

Returned: always

Sample: "single"

timeRange

list / elements=string

The time range of the maintenance.

Returned: always

Sample: [{"hours": 0, "minutes": 0}, {"hours": 0, "minutes": 0}]

timeslotList

list / elements=string

The timeslot list of the maintenance.

Returned: always

Sample: [{"endDate": "2022-12-29 22:36:00", "startDate": "2022-12-27 22:36:00"}]

timezoneOffset

string

The timezone offset of the maintenance.

Returned: always

Sample: "+02:00"

timezoneOption

string

The timezone of the maintenance.

Returned: always

Sample: "Europe/Berlin"

title

string

The title of the maintenance.

Returned: always

Sample: "maintenance 1"

weekdays

list / elements=string

The time range of the maintenance.

Returned: always

Sample: []

Authors

  • Lucas Held (@lucasheld)

Collection links

Issue Tracker Repository (Sources)

Clone this wiki locally