0

I'd like to have the response times from sites in Ansible, something along the lines like this, but in Ansible. I'm using the URI module but it seems it does not support response times.

I do not like to use the callback plugin with the time profile, because I state multiple url's in a single task.

I see Ansible does not return the values I require, is this something someone has already done?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Kevin C
  • 4,851
  • 8
  • 30
  • 64

1 Answers1

0

So, I've created a whole playbook out of this request. The playbook itself includes:

  • Check whether URL's are providing status code 200
  • Includes the reaction time from the host to the server
  • Sending Slack message when failed
  • Send the logs to an Elasticsearch server

One could set a cronjob to let the playbook run each x seconds.

Kevin C
  • 4,851
  • 8
  • 30
  • 64