how to monitor an AIX supsystem using Web-Based System Manager ?

Posted on 2008-11-12
1 Endorsement
Last Modified: 2013-11-17
Hi all,

I need to monitor an AIX supsystem called qdaemon to send me an email when it is down using Web-Based System Manager.
Using Web-based System Manager, i can create a new condition for a filesystem like /var or /tmp
but i dont know how to create a new condition to monitor qdaemon and send me an email when it is down.
see the attached file below,
what "resource class" and "monitored property" do i need to select ?
anyway, do you have another way to monitor qdaemon status ?
i know when it is down, no one can print.

Question by:gsawan
    LVL 68

    Expert Comment

    under 'Resource class' use 'Program', under 'Property' it's 'Processes'.
    Under 'Monitored Resources'  enter as a selection string 'ProgramName=="qdaemon".

    Under 'General' - 'Responses to condition' select your response (if you didn't create one see below, click OK anyway)
    Creating a response
    Go to 'Overview and Tasks' -> Create a new response.
    Enter a name, then click 'add' .

     Under 'General' enter email address and options, under 'when in effect' click add, mark 'all day', 'Everyday' or whatever you want, then click 'set' and then OK.
    If needed, go back to your condition and add your response - Under 'responses to condition' select your response from above (use the '<' arrow to add)
    At last go to 'Overview ...' -> 'Monitor conditions' and verify that your new condition gets monitored. If not, select it on the right, click '< Start' and 'close'
    Lokk at my next post!
    LVL 68

    Expert Comment

    ... websm is not _that_ good monitoring tool!
    I'd really suggest using nagios ->


    Author Comment

    Hi guys,
    i set it up as wmp's guide.
    I will test it this afternoon and let you know.


    Author Comment


    pls see the 2nd and 3rd attached files below:


    Author Comment

    pls have a look at those photo2 and photo3 above,

    if i want to monitor the qdaemon, when it down, it will send me an email (already setup :"response to condition" the email address...)
    what do i need to type in :"Event Expression" and Rearm expression" ?

    if i leave it as what you see on the Photo2, what i receive is this one :
    and it means nothing to me. I just want to receive email when it is down or crashed.


    Friday 11/14/08 11:15:02

    Condition Name: qdaemonmonitor
    Severity: Informational
    Event Type: Event
    Expression: Processes.CurPidCount != Processes.PrevPidCount

    Resource Name: ProgramName == 'qdaemon'
    Resource Class: IBM.Program
    Data Type: CT_SD_PTR
    Data Value: [2,1,{585908,1122310},{1122310}]
    Node Name: server1
    Node NameList: {server1}
    Resource Type: 0

    LVL 68

    Accepted Solution


    unfortunately this is not that straightforward. Let's see!

    1. If you only want to test whether qdaemon is running or not, please use under
    'Condition -> General -> Event expression' only
    ProcessesCurPidCount == 0
    That will be enough. Your rearm expression is OK, as well as the selection string for monitored resources.

    2. If we use the mail interface of websm, there is no possibility to change subject/body of the resulting mail.
    So we will have to go another way. We will not use the builtin email function, but use an own script which will
    exploit some environment variables we set for it and then send email.

    So please go to the response you created and do the following:
    - Mark under 'Action name' your created action -> Modify.
     Change the Action name to someting with suffix '_down'.
     Under Command to run select 'Run program' instead of 'Send mail',
     Under 'Enter program name' fill in the name of the script we will write, e.g.  
    - Check 'Run command when event occurs' _only_!
    - Under the 'Environment' tab click 'Add',
     then define a first variable, RESOURCE, value 'qdaemon'.
     Repeat this by adding RECIPIENT, value '' and STATUS, value 'down'. Click OK
    - In the 'Response' window, create a new Action by clicking 'Add'.
     Enter an Action name as something with suffix '_rearm'.
     Under Command to run select 'Run program'.
      Under 'Enter program name' fill in the name of the script above.
    - Check 'Run command when rearm event occurs' _only_!
    - Under the 'Environment' tab click 'Add',
     then define again a first variable, RESOURCE, value 'qdaemon'.
     Repeat this again by adding RECIPIENT, value '' and STATUS, value 'rearm'. Click OK
    - Now, in the 'Response' window you should see two actions: one with suffix _down', one with suffix '_rearm'
     Click OK

    3. Select 'Monitoring' in the left frame, in the right frame select 'Monitor conditions'. Verify that your
    Condition still appears in the left window. If not, select it in the right window, then click ' < Start' and then

    4. Put the script I appended in the right place on your machine, e.g. '/usr/local/scripts/event_mail'
    Make it executable (chmod +x ...)
    You can, of course, modify this script as you like, perhaps even by using more variables you defined like the
    Instead of echoing my poor string into the mail program, you could also feed a text file into it, by leaving out
    the 'echo ...' up to the pipe '|' and adding '< [text_file_name'] at the end. You could also modify the text file
    name using some of the variables, e.g. '> my_${RESOURCE}_${STATUS}_text_file', to make the script as flexible as
    possible. Sure you must create the text file, e.g. 'my_qdaemon_down_text_file'

    That's an interesting case we have her, so please test it and let me know what you think about my solution!

    Good Luck!
    Norbert (wmp)

    echo "${RESOURCE} alert (${STATUS}) sent to ${RECIPIENT}" | mail -s "{$RESOURCE} ${STATUS}" ${RECIPIENT}

    Open in new window

    LVL 68

    Expert Comment

    ... change the '>' before 'my_${RESOURCE}_${STATUS}_text_file' to '<'!
    LVL 68

    Expert Comment

    ... and if we already use a script instead of pure email, how about adding 'startsrc -s qdaemon' to it after testing the content of $STATUS to be 'down'?
    Just a hint ...

    Author Comment

    Hi Norbert,

    thanks alot for your information, i will need to test and get back to you as soon as i can.
    LVL 68

    Expert Comment


    Author Comment

    Hi Norbert,

    Thanks alot for your help. I am still trying to get it to work based on your guide, i will get back here to update you soon.
    thanks alot!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now