Skip to content

monitor_info

lucasheld edited this page May 25, 2023 · 21 revisions

lucasheld.uptime_kuma.monitor_info module -- Retrieves facts about monitors.

Note

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

To install it, use: ansible-galaxy collection install lucasheld.uptime\_kuma. You need further requirements to be able to use this module, see :ref:`Requirements <ansible_collections.lucasheld.uptime_kuma.monitor_info_module_requirements>` for details.

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

  • Retrieves facts about monitors.

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:

  • false

  • true ← (default)

api_timeout

float

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

Default: 10.0

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 monitor to inspect.

Only required if no name specified.

name

string

The name of the monitor to inspect.

Only required if no id specified.

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

Key

Description

monitors

complex

The monitors as list

Returned: always

accepted_statuscodes

list / elements=string

The accepted status codes of the monitor.

Returned: always

Sample: ["200-299"]

active

boolean

True if upside down mode is active.

Returned: always

Sample: true

authDomain

string

The auth domain of the monitor.

Returned: always

Sample: "None"

authMethod

string

The auth method of the monitor.

Returned: always

Sample: ""

authWorkstation

string

The auth workstation of the monitor.

Returned: always

Sample: "None"

basic_auth_pass

string

The basic auth pass of the monitor.

Returned: always

Sample: "None"

basic_auth_user

string

The basic auth user of the monitor.

Returned: always

Sample: "None"

body

string

The http body of the monitor.

Returned: always

Sample: "None"

databaseConnectionString

string

The sqlserver connection string of the monitor.

Returned: always

Sample: "Server=<hostname>,<port>;Database=<your database>;User Id=<your user id>;Password=<your password>;Encrypt=<true/false>;TrustServerCertificate=<Yes/No>;Connection Timeout=<int>"

databaseQuery

string

The database query of the monitor.

Returned: always

Sample: "None"

dns_last_result

string

The dns last result of the monitor.

Returned: always

Sample: "None"

dns_resolve_server

string

The dns resolve server of the monitor.

Returned: always

Sample: "1.1.1.1"

dns_resolve_type

string

The dns resolve type of the monitor.

Returned: always

Sample: "A"

docker_container

string

The docker_container of the monitor.

Returned: always

Sample: ""

docker_host

integer

The docker_host of the monitor.

Returned: always

Sample: "None"

expiryNotification

boolean

True if certificate expiry notification is enabled.

Returned: always

Sample: false

game

string

The game of the monitor.

Returned: always

Sample: "7d2d"

grpcBody

string

The grpc body of the monitor.

Returned: always

Sample: "None"

grpcEnableTls

boolean

True if grpc enable tls is enabled.

Returned: always

Sample: false

grpcMetadata

string

The grpc metadata of the monitor.

Returned: always

Sample: "None"

grpcMethod

string

The grpc method of the monitor.

Returned: always

Sample: "None"

grpcProtobuf

string

The grpc protobuf of the monitor.

Returned: always

Sample: "None"

grpcServiceName

string

The grpc service name of the monitor.

Returned: always

Sample: "None"

grpcUrl

string

The grpc url of the monitor.

Returned: always

Sample: "None"

headers

string

The http headers of the monitor.

Returned: always

Sample: "None"

hostname

string

The hostname of the monitor.

Returned: always

Sample: "None"

id

integer

The id of the monitor.

Returned: always

Sample: 1

ignoreTls

boolean

True if ignore tls error is enabled.

Returned: always

Sample: false

includeSensitiveData

boolean

The includeSensitiveData of the monitor.

Returned: always

Sample: true

interval

integer

The heartbeat interval of the monitor.

Returned: always

Sample: 60

keyword

string

The keyword of the monitor.

Returned: always

Sample: "None"

maintenance

boolean

True if the monitor is under maintenance.

Returned: always

Sample: false

maxredirects

integer

The max redirects of the monitor.

Returned: always

Sample: 10

maxretries

integer

The retries of the monitor.

Returned: always

Sample: 0

method

string

The http method of the monitor.

Returned: always

Sample: "GET"

mqttPassword

string

The mqtt password of the monitor.

Returned: always

Sample: "None"

mqttSuccessMessage

string

The mqtt success message of the monitor.

Returned: always

Sample: "None"

mqttTopic

string

The mqtt topic of the monitor.

Returned: always

Sample: "None"

mqttUsername

string

The mqtt username of the monitor.

Returned: always

Sample: "None"

name

string

The name of the monitor.

Returned: always

Sample: "test"

notificationIDList

list / elements=string

The notification ids of the monitor.

Returned: always

Sample: [1, 3]

packetSize

integer

The packetSize of the monitor.

Returned: always

Sample: 56

port

integer

The port of the monitor.

Returned: always

Sample: 53

proxyId

integer

The proxy id of the monitor.

Returned: always

Sample: 1

pushToken

string

The push token of the monitor.

Returned: always

Sample: "None"

radiusCalledStationId

string

The radiusCalledStationId of the monitor.

Returned: always

Sample: "None"

radiusCallingStationId

string

The radiusCallingStationId of the monitor.

Returned: always

Sample: "None"

radiusPassword

string

The radiusPassword of the monitor.

Returned: always

Sample: "None"

radiusSecret

string

The radiusSecret of the monitor.

Returned: always

Sample: "None"

radiusUsername

string

The radiusUsername of the monitor.

Returned: always

Sample: "None"

resendInterval

integer

The resendInterval of the monitor.

Returned: always

Sample: 0

retryInterval

integer

The heartbeat retry interval of the monitor.

Returned: always

Sample: 60

tags

list / elements=string

The tags of the monitor.

Returned: always

Sample: []

type

string

The type of the monitor.

Returned: always

Sample: "http"

upsideDown

boolean

True if upside down mode is enabled.

Returned: always

Sample: false

url

string

The url of the monitor.

Returned: always

Sample: "https://google.com"

weight

integer

The weight of the monitor.

Returned: always

Sample: 2000

Authors

  • Lucas Held (@lucasheld)

Collection links

Issue Tracker Repository (Sources)

Clone this wiki locally