Ansible nagios module, command action with parameters

24 views
Skip to first unread message

Willem D'Haese

unread,
Oct 9, 2018, 6:20:39 AM10/9/18
to Ansible Project
Hello,

I need to schedule a forced service check for all services on a Nagios host. This is possible with the 'SCHEDULE_FORCED_HOST_SVC_CHECKS' command.


The Ansible nagios module seems to have a 'command' action, but I can't find any example how to use this with parameters.


As I need to add hostname and checktime to use 'SCHEDULE_FORCED_HOST_SVC_CHECKS', could someone please enlighten me if it is supported to use the command action with parameters?

Grtz

Willem

Brad Van Orden

unread,
Oct 9, 2018, 7:59:33 AM10/9/18
to Ansible Project
Have you tried:

- name: force-nagios-check
  nagios
:
    action
: command
    command
: SCHEDULE_FORCED_HOST_SVC_CHECKS;{{inventory_hostname}};{{ansible_date_time.epoch}}


see if that works?  This module might not have that option.  Another option is to just use the command module?
Reply all
Reply to author
Forward
0 new messages