[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Service name with whitespace
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Service name with whitespace |
Date: |
Fri, 28 Jun 2019 13:29:58 +0200 |
In general, Monit of course escape URLs and HTML. As I said, it is a special
case for the service name, i.e. the name in a check statement, such as in
'check host <name>’ because the name is currently used in the URL in the
web-ui. We'll changed this to use a unique numerical service-id instead in the
web-ui so one is free to use any characters in a the service name, including
space.
Jan-Henrik
> On 28 Jun 2019, at 12:26, Robert Ehrenleitner <address@hidden> wrote:
>
> Hello, Jan-Henrik,
>
> not escaping/unescaping URLs is very lazy. Could this be fixed?
>
> Kind regards,
> rexkogitans
>
>
> Gesendet: Donnerstag, 27. Juni 2019 um 01:27 Uhr
> Von: "Jan-Henrik Haukeland" <address@hidden>
> An: "This is the general mailing list for monit" <address@hidden>
> Betreff: Re: Service name with whitespace
> The service name is used in the URL when looking at a service details page in
> the web-ui. The name therefor has to consist of URL safe chars. Since we
> don’t do URL escaping and unescaping between web-ui and internals, space is
> not allowed in a service name. Using punctuation chars like underscore,
> hyphen or dot are good choices.
>
> Jan-Henrik
>
> > On 26 Jun 2019, at 15:06, Ron Kelley <address@hidden> wrote:
> >
> > …doesn’t answer your question directly, but I use underscores in place of
> > spaces. Like this “check host “Test_Host”.
> >
> >
> >
> >> On Jun 26, 2019, at 8:35 AM, Robert Ehrenleitner <address@hidden> wrote:
> >>
> >> Hello,
> >>
> >> I just tried to give a service a somewhat more legible name containing a
> >> whitespace and realised that it is not allowed:
> >>
> >> check host "Test Host" host with address 192.168.10.140
> >> if failed ping then alert
> >>
> >> When reloading monit, it says:
> >>
> >> /etc/monit.d/test.conf:1: unbalanced quotes '"'
> >> /etc/monit.d/test.conf:1: syntax error 'Host'
> >>
> >> Same with single quotes.
> >>
> >> How can I insert a whitespace into a service name?
> >>
> >> Kind regards,
> >> rexkogitans
> >>
> >> --
> >> To unsubscribe:
> >> https://lists.nongnu.org/mailman/listinfo/monit-general
> >
> > --
> > To unsubscribe:
> > https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general