Topic
  • 5 replies
  • Latest Post - ‏2014-08-28T23:46:04Z by ajeffco
thierry_faidherbe
thierry_faidherbe
8 Posts

Pinned topic Get System Health using CLI?

‏2014-08-25T09:23:56Z |

Hello,

Does anyone know a trick to get the array Heath status (the one from the bottom right in the GUI) ?

I would like to automate a check to automate sending SMS when it change status ...

any idea ?

 

Thanks

 

Th

  • chriscanto
    chriscanto
    292 Posts

    Re: Get System Health using CLI?

    ‏2014-08-26T08:16:05Z  

    The system health status pod in the bottom right of the GUI is a combination of several CLI views, checking for any offline or degraded objects, filtering out those which are expected.

    There isn't currently an "lsheath" sort of CLI, so you'd have to build your own script to run the separate views.

    For example, once you've setup an SSH key to allow CLI access without a password, to spot if there are any arrays that have a status other than "online" you could run:

    ssh username@systemip lsarray -nohdr -delim , | cut -d, -f 3 | grep -v online

    Then alert if you received any lines of output.

    Obviously you'd need to query each of the views of interest for the different objects in the system, then you'd need to poll every few minutes....  not great....

    .... perhaps a better way is to setup email/syslog/snmp alerting and then have your automation catch errors/warnings from one of those mechanisms and generate an SMS message.   That way you handle all types of alert and don't need to constantly poll.

  • thierry_faidherbe
    thierry_faidherbe
    8 Posts

    Re: Get System Health using CLI?

    ‏2014-08-26T14:01:29Z  

    The system health status pod in the bottom right of the GUI is a combination of several CLI views, checking for any offline or degraded objects, filtering out those which are expected.

    There isn't currently an "lsheath" sort of CLI, so you'd have to build your own script to run the separate views.

    For example, once you've setup an SSH key to allow CLI access without a password, to spot if there are any arrays that have a status other than "online" you could run:

    ssh username@systemip lsarray -nohdr -delim , | cut -d, -f 3 | grep -v online

    Then alert if you received any lines of output.

    Obviously you'd need to query each of the views of interest for the different objects in the system, then you'd need to poll every few minutes....  not great....

    .... perhaps a better way is to setup email/syslog/snmp alerting and then have your automation catch errors/warnings from one of those mechanisms and generate an SMS message.   That way you handle all types of alert and don't need to constantly poll.

    Thanks for reply.

    I was looking at something like FabricOS Cmd switchstatusshow

    Switch:root> switchstatusshow
    Switch Health Report                        Report time: 08/26/2014 01:55:29 PM
    SwitchState:    HEALTHY
    Duration:       12917:49

    Power supplies monitor  HEALTHY
    Temperatures monitor    HEALTHY
    Fans monitor            HEALTHY
    Flash monitor           HEALTHY
    Marginal ports monitor  HEALTHY
    Faulty ports monitor    HEALTHY
    Missing SFPs monitor    HEALTHY

     Maybe in a next Code upgrade ;-)

    Thanks anyway for your time !

  • chriscanto
    chriscanto
    292 Posts

    Re: Get System Health using CLI?

    ‏2014-08-26T14:09:29Z  

    Thanks for reply.

    I was looking at something like FabricOS Cmd switchstatusshow

    Switch:root> switchstatusshow
    Switch Health Report                        Report time: 08/26/2014 01:55:29 PM
    SwitchState:    HEALTHY
    Duration:       12917:49

    Power supplies monitor  HEALTHY
    Temperatures monitor    HEALTHY
    Fans monitor            HEALTHY
    Flash monitor           HEALTHY
    Marginal ports monitor  HEALTHY
    Faulty ports monitor    HEALTHY
    Missing SFPs monitor    HEALTHY

     Maybe in a next Code upgrade ;-)

    Thanks anyway for your time !

    I suggest you could submit this as a 'request for enhancement' (RFE):

    http://www.ibm.com/developerworks/rfe/

    That way others with similar requirements can vote on this feature, which might give it more chance of being implemented :-)

  • TMasteen
    TMasteen
    317 Posts

    Re: Get System Health using CLI?

    ‏2014-08-26T17:48:34Z  

    I use the svcservicetask finderr command.

    IBM_Storwize:V7000_07:tmasteen>svcservicetask finderr
    There are no unfixed errors
     

    When the content is different the result is mailed.

    Updated on 2014-08-26T17:49:00Z at 2014-08-26T17:49:00Z by TMasteen
  • ajeffco
    ajeffco
    14 Posts

    Re: Get System Health using CLI?

    ‏2014-08-28T23:46:04Z  
    • TMasteen
    • ‏2014-08-26T17:48:34Z

    I use the svcservicetask finderr command.

    IBM_Storwize:V7000_07:tmasteen>svcservicetask finderr
    There are no unfixed errors
     

    When the content is different the result is mailed.

    The problem that we have seen is that sometimes the finderr commands don't show anything happening and yet the health bar is yellow or red.  This is more true on our V7000's than on our SVC's.