Problem with checking URL with ampersands

Hello guys

Having trouble checking a website with & in the url

First I checked the command working fine on the CLI:

# check_http -H intranet.upv.es -I intranet.upv.es --ssl -u '/pls/dodep/sic_depreservas.reservas?p_vista=intranet&p_idioma=c&p_fil_campus=V&p_fil_deporte=6#filtro'
HTTP OK: HTTP/1.1 200 OK - 16708 bytes in 0.088 second response time |time=0.087632s;;;0.000000 size=16708B;;;0

This is the host service in the config file:

object Service "PRUEBAS 1" {
  import "generic-service"
  host_name = "monitor-apli"
  check_command = "check_http"

  vars.notification.period = "24x7"
  check_period = "24x7"
  vars.moncau = "0"
  vars.tag = "None"
  check_interval = 10m + Math.random() * 30
  retry_interval = 1m
  max_check_attempts = 3
  enable_flapping = 1

  vars.host_name = "intranet.upv.es"
  vars.url = "'/pls/dodep/sic_depreservas.reservas?p_vista=intranet&p_idioma=c&p_fil_campus=V&p_fil_deporte=6'"
  vars.ssl = "true"

}

This is what icingaweb is saying:

image

Any idea how to make this work?

Just after posting found the solution :slight_smile:

If someone has the same problem, just remove the ’ from the url parameter in the object configuration