Skip to content

status_page

lucasheld edited this page Aug 29, 2023 · 18 revisions

lucasheld.uptime_kuma.status_page module -- Manages status pages.

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.status_page.

Synopsis

  • Manages status pages.

Requirements

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

  • uptime-kuma-api

Parameters

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

customCSS

string

The custom CSS of the status page.

description

string

The description of the status page.

domainNameList

list / elements=string

The domain name list of the status page.

footerText

string

The footer text of the status page.

googleAnalyticsId

string

The Google Analytics ID of the status page.

icon

string

The icon of the status page.

incident

dictionary

The incident of the status page.

content

string / required

The content of the status page.

style

string

The style of the status page.

Choices:

  • info

  • warning

  • danger

  • primary

  • light

  • dark

title

string / required

The title of the status page.

publicGroupList

list / elements=string

The public group list of the status page.

monitorList

list / elements=string / required

The monitor list of the group.

id

integer

The id of the monitor.

Only required if no name specified.

name

string

The name of the monitor.

Only required if no id specified.

sendUrl

boolean

True if the monitor URL is a publicly shown clickable link.

Choices:

  • no

  • yes

name

string / required

The name of the group.

weight

integer

The weight of the group.

published

boolean

True if the status page is published.

Choices:

  • no

  • yes

showPoweredBy

boolean

True if the powered by is shown.

Choices:

  • no

  • yes

showTags

boolean

True if the tags are shown.

Choices:

  • no

  • yes

slug

string / required

The slug of the status page.

state

string

Set to present to create/update a status page.

Set to absent to delete a status page.

Choices:

  • present ← (default)

  • absent

theme

string

The theme of the status page.

Choices:

  • auto

  • light

  • dark

title

string

The title of the status page.

Examples

- name: Add status page
  lucasheld.uptime_kuma.status_page:
    api_url: http://127.0.0.1:3001
    api_username: admin
    api_password: secret123
    slug: testslug
    title: testtitle
    state: present

- name: Add status page with incident
  lucasheld.uptime_kuma.status_page:
    api_url: http://127.0.0.1:3001
    api_username: admin
    api_password: secret123
    slug: testslug
    title: newtitle
    incident:
      title: incidenttitle
      content: incidentcontent
      style: info
    state: present

- name: Add status page with monitor
  lucasheld.uptime_kuma.status_page:
    api_url: http://127.0.0.1:3001
    api_username: admin
    api_password: secret123
    slug: testslug
    title: testtitle
    publicGroupList:
      - name: Services
        weight: 1
        monitorList:
          - name: Monitor 1

- name: Remove status page
  lucasheld.uptime_kuma.status_page:
    api_url: http://127.0.0.1:3001
    api_username: admin
    api_password: secret123
    slug: testslug
    state: absent

Authors

  • Lucas Held (@lucasheld)

Issue Tracker Repository (Sources)