Http_check monitor virtual hosts

I have several websites that I want to check. Normally they are virtual hosts on nignx servers. So in server1 I can have 2 virtualhosts, in server2 3 virtualhosts, in server3 1 virtualhosts, and so on. I also want to check ssl certificates. What would be the best way to do this?

So far I have done this.

Service definition:

apply Service "HTTP" {
  import "generic-service"
  check_command = "http"
  command_endpoint = ""

  assign where host.vars.vhosts

On a host definition:

object Host ""  {
    import "generic-host"

    vars.vhosts[""] = {
      http_ssl = true
    vars.vhosts[""] = {
      http_ssl = true

So in Icingaweb2 I can monitor, but not

Does this make sense? Am I on the right track? The ssl part would come later.

Thanks a lot.

Take a look at the docs for “Apply for” and “Apply for with custom vars override”:

This should do what you are looking for :slight_smile:

1 Like

yes, thanks a lot :slight_smile: