unexpected end of file
Posted: Wed Mar 30, 2016 3:35 am
Trying to monitor a rather long URL again, but having some escaping issues again. Already tried to make a macro for '&', but it doesn't seem enough... I was wondering what other characters need escaping..
IN CLI everything works fine:
In Nagios XI I tried many combination, single, double quotes, $USER10$=& in resources.cfg...
What other characters need escaping in service arguments?
The host is 'stad.gent' and externally availble if someone would like to give it a try... Thanks!!
EDIT: Went very crazy and tried escaping lots of stuff, but still having the same issue...
reource.cfg:
Same question as in https://support.nagios.com/forum/viewto ... +ampersand.. Why is this so hard? I would like to make a feature request to make it easier to monitor things with special chars in..
IN CLI everything works fine:
Code: Select all
/usr/local/nagios/libexec/check_http -H stad.gent -u '/sparql?default-graph-uri=&query=prefix+schema:+%3Chttp://schema.org/%3E%0D%0AASK+%7B%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?id+=+%22%22)%0D%0A%7D%0D%0AUNION+%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?type+=+%22%22)%0D%0A%7D%0D%0A%7D&format=text/html&timeout=0&debug=on' -S -s 'false' HTTP OK: HTTP/1.1 200 OK - 298 bytes in 0.021 second response time |time=0.021460s;;;0.000000 size=298B;;;0Code: Select all
-u "/sparql?default-graph-uri=$User10$query=prefix+schema:+%3Chttp://schema.org/%3E%0D%0AASK+%7B%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?id+=+%22%22)%0D%0A%7D%0D%0AUNION+%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?type+=+%22%22)%0D%0A%7D%0D%0A%7D$User10$format=text/html$User10$timeout=0$User10$debug=on" -S -s 'false'Code: Select all
-u "/sparql?default-graph-uri=&query=prefix+schema:+%3Chttp://schema.org/%3E%0D%0AASK+%7B%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?id+=+%22%22)%0D%0A%7D%0D%0AUNION+%0D%0A%7B%0D%0A?loc+%3Chttp://stad.gent/data/internal/resourceId%3E+?id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E+?type.%0D%0A%0D%0AFILTER+(?type+=+%22%22)%0D%0A%7D%0D%0A%7D&format=text/html&timeout=0&debug=on" -S -s 'false'EDIT: Went very crazy and tried escaping lots of stuff, but still having the same issue...
Code: Select all
-u '/sparql$USER11$default-graph-uri=$User10$query=prefix$USER14$schema:$USER14$%3Chttp://schema.org/%3E%0D%0AASK$USER14$%7B%0D%0A%7B%0D%0A$USER11$loc$USER14$%3Chttp://stad.gent/data/internal/resourceId%3E$USER14$$USER11$id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E$USER14$$USER11$type.%0D%0A%0D%0AFILTER$USER14$$USER12$$USER11$id$USER14$=$USER14$%22%22$USER13$%0D%0A%7D%0D%0AUNION$USER14$%0D%0A%7B%0D%0A$USER11$loc$USER14$%3Chttp://stad.gent/data/internal/resourceId%3E$USER14$$USER11$id;%0D%0A%3Chttp://stad.gent/data/internal/resourceType%3E$USER14$$USER11$type.%0D%0A%0D%0AFILTER$USER14$$USER12$$USER11$type$USER14$=$USER14$%22%22$USER13$%0D%0A%7D%0D%0A%7D$User10$format=text/html$User10$timeout=0$User10$debug=on' -S -s 'false'Code: Select all
$USER10$=&
$USER11$=?
$USER12$=(
$USER13$=)
$USER14$=+