Retrieving the active Alert file

Homepage Clovertech Forums Cloverleaf Retrieving the active Alert file

Tagged: 

  • Creator
    Topic
  • #121383
    Jeffkohl
    Participant

    first time post so do not beat me up here.

    Working on scripts for the alert file which makes a copy of the alert file, looks for certain alerts based on a group name, when it finds those alerts it de-activates them. Then I run a command that cycles the monitor daemon and starts it up with the new alert file.  We would be running this before schedule downtime of certain systems so that we do not get alerts every 5 mins knowing that the system is down. Then when the down time is over run another scripts that cycles the monitor daemon again, but sets the alert file to use back to the default alert file.

    I would like to output some information to a log file when the script runs where for each site it returns what is the active file that is being used by the monitor daemon for alerts. After it is bounced.

    I can not seem to find the location or even a command to run will within a site prompt to return what the name is of the file that the monitor daemon is currently using.

    Any help as to where I can find the command or even a file that has that information stored would be helpful.

    THanks

Viewing 3 reply threads
  • Author
    Replies
    • #121385
      Charlie Bursell
      Participant

      Seems to me to be overkill unless I am missing something.

      Simply create multiple Alert files and give each some meaningful name like weekend.alrt, etc.   Make sure you save a copy of your stardard alerts file to something like standard.alrt. Then when you need your special alerts simply rename the alert file you want to use to default.alrt.  Then run hcisitectl.  When no longer needed rename standard.alrt to default.alrt and run hcisitectl again.

      This could be easily scripted if need be and, INHO, much easier than traversing and editing an alert file.

      As I said, maybe I am missing something here.

    • #121386
      Jeffkohl
      Participant

      yes it is a little over kill but being super cautious

    • #121387
      Robert Kersemakers
      Participant

      If on Linux you can run ‘ps -ef|grep hcimonitord’ on the prompt which will show you all occurrences of hcimonitord, per site. With this you can do the check you want; check on ‘-S’ to see for which site the specific monitor daemon is running.

      For example: we have a regular check running to see if someone has activated the ’empty’ alert file; something we need to do if we have maintenance or need to stop some interfaces without the Alerts restarting them automatically. If the empty alert-file is running, then we get an email to warn us. Here a piece of the script.

      if [ ps -ef|grep hcimonitord|grep “\-S overig”|grep empty|wc -l != 0 ]
      then
      /cldata/scripts/write_alert overig overig mond no_touch mail
      fi

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #121393
      Jeffkohl
      Participant

      Thank you Robert that is just wanted I needed !

Viewing 3 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10