lucasheld / ansible-uptime-kuma

Ansible collection of modules to configure Uptime Kuma
GNU General Public License v3.0
144 stars 19 forks source link

fix creation of mysql monitor #15

Closed beechesII closed 1 year ago

beechesII commented 1 year ago

Hello folks,

I got the following error if I want to create a mysql monitor:

TASK [uptime-kuma : Manage database monitor] *************************************************************************************************************************************************************
failed: [example-host] (item={'name': 'Availability - MariaDB Database some_database_name', 'type': 'mysql', 'databaseConnectionString': 'mysql://user:xxxxxxxxxxxx@192.168.0.100:3306/some_database_name', 'databaseQuery': 'select count(*) from oc_users;', 'interval': 300, 'retryinterval': 300, 'notification_names': ['My Home Alerts']}) => changed=false 
  ansible_loop_var: item
  item:
    databaseConnectionString: mysql://user:xxxxxxxxxxxx@192.168.0.100:3306/some_database_name
    databaseQuery: select count(*) from oc_users;
    interval: 300
    name: Availability - MariaDB Database some_database_name
    notification_names:
    - My Home Alerts
    retryinterval: 300
    type: mysql
  msg: 'value of type must be one of: http, port, ping, keyword, dns, docker, push, steam, mqtt, sqlserver, postgres, radius, got: mysql'

I use the lastest version of ansible-uptime-kuma.

Please review and merge the following changes.

lucasheld commented 1 year ago

Thank you very much! Looks like I forgot to implement that.