I am getting the following error from puppet/sensuctl, saying that I cannot create a resource (check) because what I put in the “cron” field is invalid:
Notice: /Stage[main]/Profile_sensu::Checks::Postgres/Sensu_check[postgres_active_connections in team15]/cron: defined 'cron' as '* * * * *' Error: /Stage[main]/Profile_sensu::Checks::Postgres/Sensu_check[postgres_active_connections in team15]: Could not evaluate: sensuctl create postgres_active_connections in team15 failed Error message: Execution of '/usr/bin/sensuctl create --file /tmp/sensuctl20200604-107855-1qo18jp' returned 1: Error: error putting resource #0 with name "postgres_active_connections" and namespace "team15" (/api/core/v2/namespaces/team15/checks/postgres_active_connections): resource is invalid: must only specify either an interval or a cron schedule
However, specifying the cron interval of ‘* * * * *’ is listed in the sensu docs example as a valid cron statement: https://docs.sensu.io/sensu-go/latest/reference/checks/#cron-scheduling
Examples of valid cron values include:
cron: CRON_TZ=Asia/Tokyo * * * * * cron: TZ=Asia/Tokyo * * * * * cron: '* * * * *'
So I don’t know why it’s saying ‘* * * * *’ is not a valid cron schedule.