"if failed gid disk then alert" throws syntax error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"if failed gid disk then alert" throws syntax error

Marcus Mülbüsch-3
Hello all,

the following tests works well with monit-5.20.0

> check filesystem root_fs with path /dev/sda5
>         if failed uid root then alert
>         if failed gid disk then alert

as "ls -l /dev/sda5" shows (not surprisingly):

> brw-rw---- 1 root disk 8, 5 Aug  3 16:33 /dev/sda5

However, monit-5.22.0 cannot start:

> /usr/local/monit.d/filesytems.monit:18: syntax error 'disk'

I could switch to watching the numeric id of the user group disk, but
would rather keep all my configs unmodified!

Is there any workaround or fix?

Marcus





--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: "if failed gid disk then alert" throws syntax error

martinp@tildeslash.com
Hello Marcus,

the "disk" is now reserved word, you need to quote it if you want to use it as gid. Example:

    check filesystem root_fs with path /dev/sda5
       if failed uid "root" then alert
       if failed gid "disk" then alert

Best regards,
Martin



> On 3 Aug 2017, at 16:44, Marcus Mülbüsch <[hidden email]> wrote:
>
> Hello all,
>
> the following tests works well with monit-5.20.0
>
>> check filesystem root_fs with path /dev/sda5
>>        if failed uid root then alert
>>        if failed gid disk then alert
>
> as "ls -l /dev/sda5" shows (not surprisingly):
>
>> brw-rw---- 1 root disk 8, 5 Aug  3 16:33 /dev/sda5
>
> However, monit-5.22.0 cannot start:
>
>> /usr/local/monit.d/filesytems.monit:18: syntax error 'disk'
>
> I could switch to watching the numeric id of the user group disk, but would rather keep all my configs unmodified!
>
> Is there any workaround or fix?
>
> Marcus
>
>
>
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: "if failed gid disk then alert" throws syntax error

Marcus Mülbüsch-3
Am 03.08.2017 um 16:53 schrieb [hidden email]:

Hello Martinm

> the "disk" is now reserved word, you need to quote it if you want to use it as gid. Example:

Thank you! I realized it became a reserved word, but didn't realize that
qouting will help!

Marcus


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general