Nagios: Check DS4700 cabinet and HW

Another nagios-check I configured for our environment:

Download the SM Client from IBM website .


Install the Client

rpm -i SMruntime-LINUX-10.60.A5.01-1.i586.rpm
rpm -i SMesm-LINUX-10.60.G5.04-1.noarch.rpm
rpm -i SMutil-LINUX-10.00.A5.13-1.i386.rpm
rpm -i SMclient-LINUX-10.60.G5.16-1.noarch.rpm


After succesful installation the SMI – Client needs to register the DS4700 subsystem:

/opt/IBM_DS/client/SMcli -A <ip_add_controller_A> <ip_add_controller_B> -S


Edit /etc/sudoers file on the linux system and append following lines:

nagios ALL=NOPASSWD: /usr/bin/sudo
nagios ALL=NOPASSWD: /opt/IBM_DS/client/SMcli

That will allow nagios to execute the SMcli and sudo without being prompted for a password (needed for this plugin). With an innital check under the nagios user verify if the SMcli is working:

sudo /opt/IBM_DS/client/SMcli -n <DS4xxx Name that was registered earlier> -c "show storagesubsystem profile;"

If this command shows you many information, basicly a config output of the complete subsystem, the CLI is working fine and we continue with Nagios configuration. Get the plugin and put it under /usr/local/nagios-plugins/


Nagios command configuration:

checkcommand:

define command{
command_name    cmd_check_ibm_ds4000
command_line    $USER1$/check_IBM_totalstorage_ds4x00.pl -n $HOSTALIAS$ -t $_SERVICECHECKNAME$
}


servicecommand:

define service{
name                            svc_tpl_check_ibm_ds4000_test
use                             svc_tpl_service_test
check_command                   cmd_check_ibm_ds4000
service_groups                  svc_grp_check_ibm_ds4000_test
register                        0
max_check_attempts              3
check_interval           120               #normal check interval in hard state (minutes)
retry_interval            1           #check interval in soft state (minutes)
}

host servicecheck defintion:


define service{
use                     svc_tpl_check_ibm_ds4000_test
host_name               stg_ds4700_dc02
_CHECKNAME              array_status
service_description     Check array status DS4700 DC02
}

define service{
use                     svc_tpl_check_ibm_ds4000_test
host_name               stg_ds4700_dc02
_CHECKNAME              disk_status
service_description     Check disk status DS4700 DC02
}

define service{
use                     svc_tpl_check_ibm_ds4000_test
host_name               stg_ds4700_dc02
_CHECKNAME              device_status
service_description     Check device status DS4700 DC02
}

define service{
use                     svc_tpl_check_ibm_ds4000_test
host_name               stg_ds4700_dc02
_CHECKNAME              logical_status
service_description     Check logical status DS4700 DC02
}

define service{
use                     svc_tpl_check_ibm_ds4000_test
host_name               stg_ds4700_dc02
_CHECKNAME              system_status
service_description     Check system status DS4700 DC02
}
Download the SM Client from IBM website .

Install the Client

Quellcode

1
2
3
4
rpm -i SMruntime-LINUX-10.60.A5.01-1.i586.rpm
rpm -i SMesm-LINUX-10.60.G5.04-1.noarch.rpm
rpm -i SMutil-LINUX-10.00.A5.13-1.i386.rpm
rpm -i SMclient-LINUX-10.60.G5.16-1.noarch.rpm

After succesful installation the SMI – Client needs to register the DS4700 subsystem:

Quellcode

1
/opt/IBM_DS/client/SMcli -A <ip_add_controller_A> <ip_add_controller_B> -S

Edit /etc/sudoers file on the linux system and append following lines:

Quellcode

1
2
nagios ALL=NOPASSWD: /usr/bin/sudo
nagios ALL=NOPASSWD: /opt/IBM_DS/client/SMcli

That will allow nagios to execute the SMcli and sudo without being prompted for a password (needed for this plugin). With an innital check under the nagios user verify if the SMcli is working: sudo /opt/IBM_DS/client/SMcli -n <DS4xxx Name that was registered earlier> -c “show storagesubsystem profile;”

If this command shows you many information, basicly a config output of the complete subsystem, the CLI is working fine and we continue with Nagios configuration. Get the plugin and put it under /usr/local/nagios-plugins/

Attachement has the changed check that is able to check each HDD within the DS4xxx

Nagios command configuration:

Quellcode

1
2
3
4
define command{
        command_name    cmd_check_ibm_ds4000
        command_line    $USER1$/check_IBM_totalstorage_ds4x00.pl -n $HOSTALIAS$ -t $_SERVICECHECKNAME$
        }

servicecommand:

Quellcode

1
2
3
4
5
6
7
8
9
10
define service{
        name                            svc_tpl_check_ibm_ds4000_test
        use                             svc_tpl_service_test
        check_command                   cmd_check_ibm_ds4000
        service_groups                  svc_grp_check_ibm_ds4000_test
        register                        0
        max_check_attempts              3
        check_interval           120               #normal check interval in hard state (minutes)
        retry_interval            1           #check interval in soft state (minutes)
        }

host servicecheck defintion:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
define service{
        use                     svc_tpl_check_ibm_ds4000_test
        host_name               stg_ds4700_dc02
        _CHECKNAME              array_status
        service_description     Check array status DS4700 DC02
}

define service{
        use                     svc_tpl_check_ibm_ds4000_test
        host_name               stg_ds4700_dc02
        _CHECKNAME              disk_status
        service_description     Check disk status DS4700 DC02
}

define service{
        use                     svc_tpl_check_ibm_ds4000_test
        host_name               stg_ds4700_dc02
        _CHECKNAME              device_status
        service_description     Check device status DS4700 DC02
}

define service{
        use                     svc_tpl_check_ibm_ds4000_test
        host_name               stg_ds4700_dc02
        _CHECKNAME              logical_status
        service_description     Check logical status DS4700 DC02
}

define service{
        use                     svc_tpl_check_ibm_ds4000_test
        host_name               stg_ds4700_dc02
        _CHECKNAME              system_status
        service_description     Check system st
Download the SM Client from IBM website .

Install the Client

Quellcode

1

2

3

4

rpm -i SMruntime-LINUX-10.60.A5.01-1.i586.rpm

rpm -i SMesm-LINUX-10.60.G5.04-1.noarch.rpm

rpm -i SMutil-LINUX-10.00.A5.13-1.i386.rpm

rpm -i SMclient-LINUX-10.60.G5.16-1.noarch.rpm

After succesful installation the SMI - Client needs to register the DS4700 subsystem:

Quellcode

1

/opt/IBM_DS/client/SMcli -A <ip_add_controller_A> <ip_add_controller_B> -S

Edit /etc/sudoers file on the linux system and append following lines:

Quellcode

1

2

nagios ALL=NOPASSWD: /usr/bin/sudo

nagios ALL=NOPASSWD: /opt/IBM_DS/client/SMcli

That will allow nagios to execute the SMcli and sudo without being prompted for a password (needed for this plugin). With an innital check under the nagios user verify if the SMcli is working: sudo /opt/IBM_DS/client/SMcli -n <DS4xxx Name that was registered earlier> -c "show storagesubsystem profile;"

If this command shows you many information, basicly a config output of the complete subsystem, the CLI is working fine and we continue with Nagios configuration. Get the plugin and put it under /usr/local/nagios-plugins/

Attachement has the changed check that is able to check each HDD within the DS4xxx

Nagios command configuration:

Quellcode

1

2

3

4

define command{

command_name    cmd_check_ibm_ds4000

command_line    $USER1$/check_IBM_totalstorage_ds4x00.pl -n $HOSTALIAS$ -t $_SERVICECHECKNAME$

}

servicecommand:

Quellcode

1

2

3

4

5

6

7

8

9

10

define service{

name                            svc_tpl_check_ibm_ds4000_test

use                             svc_tpl_service_test

check_command                   cmd_check_ibm_ds4000

service_groups                  svc_grp_check_ibm_ds4000_test

register                        0

max_check_attempts              3

check_interval           120               #normal check interval in hard state (minutes)

retry_interval            1           #check interval in soft state (minutes)

}

host servicecheck defintion:

Quellcode

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

define service{

use                     svc_tpl_check_ibm_ds4000_test

host_name               stg_ds4700_dc02

_CHECKNAME              array_status

service_description     Check array status DS4700 DC02

}

define service{

use                     svc_tpl_check_ibm_ds4000_test

host_name               stg_ds4700_dc02

_CHECKNAME              disk_status

service_description     Check disk status DS4700 DC02

}

define service{

use                     svc_tpl_check_ibm_ds4000_test

host_name               stg_ds4700_dc02

_CHECKNAME              device_status

service_description     Check device status DS4700 DC02

}

define service{

use                     svc_tpl_check_ibm_ds4000_test

host_name               stg_ds4700_dc02

_CHECKNAME              logical_status

service_description     Check logical status DS4700 DC02

}

define service{

use                     svc_tpl_check_ibm_ds4000_test

host_name               stg_ds4700_dc02

_CHECKNAME              system_status

service_description     Check system status DS4700 DC02

}

atus DS4700 DC02
}
Advertisements
This entry was posted in Nagios and tagged , , , , , . Bookmark the permalink.

One Response to Nagios: Check DS4700 cabinet and HW

  1. Fernando says:

    Great work, very useful, thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s