-
Notifications
You must be signed in to change notification settings - Fork 19
monitor
Note
This module is part of the lucasheld.uptime_kuma collection (version 1.0.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 git+https://github.com/lucasheld/ansible-uptime-kuma.git
.
To use it in a playbook, specify: lucasheld.uptime_kuma.monitor
.
- Manages monitors.
The below requirements are needed on the host that executes this module.
- uptime-kuma-api
Parameter |
Comments |
---|---|
The accepted status codes of the monitor. |
|
The Uptime Kuma password. Only required if no api_token specified. |
|
The Uptime Kuma login token. Only required if no api_username and api_password specified. |
|
The Uptime Kuma URL. Default: "http://127.0.0.1:3001" |
|
The Uptime Kuma username. Only required if no api_token specified. |
|
The auth domain of the monitor. |
|
The auth method of the monitor. Choices:
|
|
The auth workstation of the monitor. |
|
The auth pass of the monitor. |
|
The auth user of the monitor. |
|
The http body of the monitor. |
|
The sqlserver connection string of the monitor. |
|
The sqlserver query of the monitor. |
|
The dns resolve server of the monitor. |
|
The dns resolve type of the monitor. |
|
True if certificate expiry notification is enabled. Choices:
|
|
The http headers of the monitor. |
|
The hostname of the monitor. |
|
The id of the monitor. Only required if no name specified. |
|
True if ignore tls error is enabled. Choices:
|
|
The heartbeat interval of the monitor. |
|
The keyword of the monitor. |
|
The redirects of the monitor. |
|
The max retries of the monitor. |
|
The http method of the monitor. |
|
The mqtt password of the monitor. |
|
The mqtt success message of the monitor. |
|
The mqtt topic of the monitor. |
|
The mqtt username of the monitor. |
|
The name of the monitor. Only required if no id specified. |
|
The notification names of the monitor. Only required if notificationIDList not specified. |
|
The notification ids of the monitor. Only required if notification_names not specified. |
|
The port of the monitor. |
|
The proxy of the monitor. |
|
The host of the proxy. Only required if no proxyId specified. |
|
The port of the proxy. Only required if no proxyId specified. |
|
The proxy id of the monitor. Only required if no proxy specified. |
|
The heartbeat retry interval of the monitor. |
|
Set to Set to Set to Set to Choices:
|
|
The type of the monitor. Choices:
|
|
True if upside down mode is enabled. Choices:
|
|
The url of the monitor. |
- name: Add a monitor
lucasheld.uptime_kuma.monitor:
api_url: http://192.168.1.10:3001
api_username: admin
api_password: secret
type: keyword
name: Peer 1
url: http://192.168.20.135
keyword: healthy
state: present
- name: Edit a monitor
lucasheld.uptime_kuma.monitor:
api_url: http://192.168.1.10:3001
api_username: admin
api_password: secret
type: http
name: Peer 1
url: http://192.168.20.135
state: present
- name: Remove a monitor
lucasheld.uptime_kuma.monitor:
api_url: http://192.168.1.10:3001
api_username: admin
api_password: secret
name: Peer 1
state: absent
- name: Pause a monitor
lucasheld.uptime_kuma.monitor:
api_url: http://192.168.1.10:3001
api_username: admin
api_password: secret
name: Peer 1
state: paused
- name: Resume a monitor
lucasheld.uptime_kuma.monitor:
api_url: http://192.168.1.10:3001
api_username: admin
api_password: secret
name: Peer 1
state: resumed
- Lucas Held (@lucasheld)