Syntax error: when using “check program” in monitmonit syntax error : “if 5 restarts within 5 cycles...

Hacking a Safe Lock after 3 tries

What exactly is this small puffer fish doing and how did it manage to accomplish such a feat?

Who is flying the vertibirds?

Official degrees of earth’s rotation per day

Does someone need to be connected to my network to sniff HTTP requests?

Can a druid choose the size of its wild shape beast?

If I can solve Sudoku can I solve Travelling Salesman Problem(TSP)? If yes, how?

What options are left, if Britain cannot decide?

How to make healing in an exploration game interesting

What's the meaning of “spike” in the context of “adrenaline spike”?

Identifying the interval from A♭ to D♯

Gravity magic - How does it work?

Can I use USB data pins as power source

Instead of Universal Basic Income, why not Universal Basic NEEDS?

How can I track script which gives me "command not found" right after the login?

Are all passive ability checks floors for active ability checks?

What should tie a collection of short-stories together?

Why doesn't using two cd commands in bash script execute the second command?

Why does Bach not break the rules here?

My Graph Theory Students

SOQL: Populate a Literal List in WHERE IN Clause

How to change two letters closest to a string and one letter immediately after a string using notepad++

How do anti-virus programs start at Windows boot?

How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?



Syntax error: when using “check program” in monit


monit syntax error : “if 5 restarts within 5 cycles then alert”Monit won't start: “Cannot translate '<hostname>' to FQDN name — nodename nor servname provided”Monit - issue configuring “check program”monit “check program” with email?Restarting shell script with &disown using MonitAwaken monit daemon every few hours for all monitored processesExecute custom monit script upon failure to restart the processHow can I restart “monit” when it stops or crashes?monit: /etc/monit.conf:188: Error: syntax error 'start program = "'monit, run program based on another check













0















I have the following configuration in Monit:



check program raid-md127 with path "/sbin/mdadm --misc --test /dev/md127"
if status != 0 then alert


When restart monit, I get the following error:



root@NAS2:/etc/apt/sources.list.d# /etc/init.d/monit restart
Stopping daemon monitor: monit.
Starting daemon monitor: Syntax error:
/etc/monit/monitrc:29: Error: syntax error 'raid-md127'


Can you advice, please?










share|improve this question

























  • The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

    – DevOps
    Jan 17 '17 at 18:07











  • root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

    – Murugan Chandrasekar
    Jan 18 '17 at 6:42













  • root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

    – Murugan Chandrasekar
    Jan 18 '17 at 6:45











  • Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

    – DevOps
    Jan 18 '17 at 16:56
















0















I have the following configuration in Monit:



check program raid-md127 with path "/sbin/mdadm --misc --test /dev/md127"
if status != 0 then alert


When restart monit, I get the following error:



root@NAS2:/etc/apt/sources.list.d# /etc/init.d/monit restart
Stopping daemon monitor: monit.
Starting daemon monitor: Syntax error:
/etc/monit/monitrc:29: Error: syntax error 'raid-md127'


Can you advice, please?










share|improve this question

























  • The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

    – DevOps
    Jan 17 '17 at 18:07











  • root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

    – Murugan Chandrasekar
    Jan 18 '17 at 6:42













  • root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

    – Murugan Chandrasekar
    Jan 18 '17 at 6:45











  • Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

    – DevOps
    Jan 18 '17 at 16:56














0












0








0








I have the following configuration in Monit:



check program raid-md127 with path "/sbin/mdadm --misc --test /dev/md127"
if status != 0 then alert


When restart monit, I get the following error:



root@NAS2:/etc/apt/sources.list.d# /etc/init.d/monit restart
Stopping daemon monitor: monit.
Starting daemon monitor: Syntax error:
/etc/monit/monitrc:29: Error: syntax error 'raid-md127'


Can you advice, please?










share|improve this question
















I have the following configuration in Monit:



check program raid-md127 with path "/sbin/mdadm --misc --test /dev/md127"
if status != 0 then alert


When restart monit, I get the following error:



root@NAS2:/etc/apt/sources.list.d# /etc/init.d/monit restart
Stopping daemon monitor: monit.
Starting daemon monitor: Syntax error:
/etc/monit/monitrc:29: Error: syntax error 'raid-md127'


Can you advice, please?







monit






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 mins ago









Eddie C.

391211




391211










asked Jan 10 '17 at 12:32









Murugan ChandrasekarMurugan Chandrasekar

29112




29112













  • The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

    – DevOps
    Jan 17 '17 at 18:07











  • root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

    – Murugan Chandrasekar
    Jan 18 '17 at 6:42













  • root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

    – Murugan Chandrasekar
    Jan 18 '17 at 6:45











  • Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

    – DevOps
    Jan 18 '17 at 16:56



















  • The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

    – DevOps
    Jan 17 '17 at 18:07











  • root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

    – Murugan Chandrasekar
    Jan 18 '17 at 6:42













  • root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

    – Murugan Chandrasekar
    Jan 18 '17 at 6:45











  • Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

    – DevOps
    Jan 18 '17 at 16:56

















The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

– DevOps
Jan 17 '17 at 18:07





The syntax seems correct. What is the monit version ? Could it be an error from a previous line ? Did you tried without the dash ? I have checks with dash running fine on my side

– DevOps
Jan 17 '17 at 18:07













root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

– Murugan Chandrasekar
Jan 18 '17 at 6:42







root@NAS2:/home/murugan# monit -V This is Monit version 5.4 Copyright (C) 2001-2012 Tildeslash Ltd. All Rights Reserved.

– Murugan Chandrasekar
Jan 18 '17 at 6:42















root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

– Murugan Chandrasekar
Jan 18 '17 at 6:45





root@NAS2:/home/murugan# /etc/init.d/monit restart Stopping daemon monitor: monit. Starting daemon monitor: monit/etc/monit/monitrc:323: Warning: Program does not exist: '"/sbin/mdadm misc test /dev/md127"' . Warning: Please, set start delay for monit in config file and delete /etc/monit/monit_delay file. root@NAS2:/home/murugan#

– Murugan Chandrasekar
Jan 18 '17 at 6:45













Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

– DevOps
Jan 18 '17 at 16:56





Monit 5.4, this is very old. Could you consider upgrading to a newer version ? Maybe this is a bug. However, warning error at restart is different: it complained about not being able to run the program and all the dash seem to have disappeared (if not removed by serverfault). So it is probably a bug at monit level.

– DevOps
Jan 18 '17 at 16:56










1 Answer
1






active

oldest

votes


















2














The functionality to use parameters in the command was first introduced in Monit 5.7;
https://mmonit.com/monit/changes/



You need to upgrade to a newer version of Monit.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f825300%2fsyntax-error-when-using-check-program-in-monit%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    The functionality to use parameters in the command was first introduced in Monit 5.7;
    https://mmonit.com/monit/changes/



    You need to upgrade to a newer version of Monit.






    share|improve this answer




























      2














      The functionality to use parameters in the command was first introduced in Monit 5.7;
      https://mmonit.com/monit/changes/



      You need to upgrade to a newer version of Monit.






      share|improve this answer


























        2












        2








        2







        The functionality to use parameters in the command was first introduced in Monit 5.7;
        https://mmonit.com/monit/changes/



        You need to upgrade to a newer version of Monit.






        share|improve this answer













        The functionality to use parameters in the command was first introduced in Monit 5.7;
        https://mmonit.com/monit/changes/



        You need to upgrade to a newer version of Monit.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 4 '17 at 9:08









        VidarNormannVidarNormann

        212




        212






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f825300%2fsyntax-error-when-using-check-program-in-monit%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

            Список ссавців Італії Природоохоронні статуси | Список |...

            Українські прізвища Зміст Історичні відомості |...