Running a shell script in an alert

Clovertech Forums Cloverleaf Running a shell script in an alert

  • Creator
    Topic
  • #121152
    Carl Tosi
    Participant

      Currently, I have an alert set to ‘exec’ action. I have  it pointing to a  shell proc, /opt/cloverleaf/cis20.1/integrator/uimcpmsc/scripts/Phil_Dev_alrt_bounce.sh), to bounce the thread when it exceeds max threhold.

       

      Can I just place the commands in the textbox instead :

      hcicmd -p dvcedtahl7PROD -c ‘f_PHLPS_dvce pstop’
      sleep 30
      hcicmd -p dvcedtahl7PROD -c ‘f_PHLPS_dvce pstart’

       

      TIA,
      Carl Tosi

    Viewing 1 reply thread
    • Author
      Replies
      • #121153
        Gene Millard
        Participant

          You can put the command in the Command box.

          There is a new command you can use to cycle the thread.

          It is prestart

          hcicmd -p dvcedtahl7PROD -c ‘f_PHLPS_dvce prestart 30’

           

          Gene Millard

          The Guthrie Clinic
          Sayre, PA

        • #121159
          Charlie Bursell
          Participant

            As I have said before, stopping and starting threads can be a bit ify at times.  You don’t know how much more the thread might attempt to do before stopping or even if it stops at all.  It all depends on busy the process is.  The command may time out before it is executed.

            I find it safer to stop the process even if it means putting a thread in a process by itself or with other threads you don’t mind stopping/starting a the same time.  The process stop command will kick the process to death if it does not stop naturally.

            Just my $0.02.

        Viewing 1 reply thread
        • You must be logged in to reply to this topic.