Skip to content

Commit

Permalink
Documentation and config sample
Browse files Browse the repository at this point in the history
  • Loading branch information
qaxi committed Apr 6, 2017
1 parent 627d632 commit 2d8818d
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 49 deletions.
133 changes: 133 additions & 0 deletions 3par.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
###########################################################################
#
# Sample configuration for monitoring 3par
#


# check by SSH
# you need to import ssh key of user `nagios` (or whatever user you run Nagios on) to 3PAR
#
#
define command {
command_name check_3par
command_line $USER1$check_3par -H $HOSTADDRESS$ -w 80 -c 90 -u admin $ARG1$ $ARG2$ $ARG3$
}

### # check by 3PAR CLI tools
### define command {
### command_name check_3par
### command_line $USER1$check_3par -H $HOSTADDRESS$ -w 80 -c 90 -i /usr/local/inform/bin/cli -p/var/lib/nagios3/3par.pwf $ARG1$ $ARG2$ $ARG3$ $ARG4$
### }

# Template
define host {
name 3par
use unix
register 0
icon_image hp.png
statusmap_image hp.gd2
}

define service {
name 3par-service
use service
contact_groups nagios
}

######################################################
define host {
host_name 3par1.example.net
use 3par
parents switch.example.net
}

define host {
host_name 3par1.example.net
use 3par
parents switch.example.net
}

define host {
host_name 3par-qw.example.net
use linux
parents switch.example.net
}

######################################################
define hostgroup {
hostgroup_name 3par
members 3par1.example.net, 3par1.example.net
}

define service {
hostgroup_name 3par
service_description physical disks status
check_command check_3par!check_pd!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description controller status
check_command check_3par!check_node!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description logical disks status
check_command check_3par!check_ld!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description virtual volumes status
check_command check_3par!check_vv!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description FC port status
check_command check_3par!check_port_fc!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description SSD used capacity
check_command check_3par!check_cap_ssd!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description FC used capacity
check_command check_3par!check_cap_fc!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description NL used capacity
check_command check_3par!check_cap_nl!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description node power supply
check_command check_3par!check_ps_node!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description cage power supply
check_command check_3par!check_ps_cage!!
use 3par-service
}
define service {
hostgroup_name 3par
service_description volume status
check_command check_3par!check_volume!VOLUME_NAME!
use 3par-service
}
define service {
hostgroup_name 3par
service_description quorum witnes
check_command check_3par!check_qw!QUORUM_WITNESS!
use 3par-service
}
129 changes: 80 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,90 @@

Basic support for monitoring HP 3PAR arrays by Nagios

Unfortunately this plugin does not conform to Nagios plugin commandline standard

## Usage
```
check_3par 3PAR Username Command
check_3par -h | -H <3PAR> [-d] [-u <username>] [-i <inform_cli> [-p <password_file>]] [-w <warning>] [-c <critical>] COMMAND [ arg [arg ...]]
Options:
-h, --help
Print detailed help screen
-H, --hostname=ADDRESS
3PAR controler
-i, --inform-bin=PATH
Path to 3PAR Inform CLI. Default connection method is SSH.
-u, --username=USER
3PAR username
-p, --password-file=PATH
Password file for 3PAR Inform CLI
-w, --warning=TRESHOLD (default: 80)
Warning treshold
-c, --critical=TRESHOLD (default: 90)
Critical treshold
-d, --debug
Turn on debugging
```

## Supported commands
```
check_pd : Check status of physical disks
Degraded -> Warning
Failed -> Critical
check_node : Check status of controller nodes
Degraded -> Warning
Failed -> Critical
check_ld : Check status of logical disks
Degraded -> Warning
Failed -> Critical
check_vv : Check status of virtual volumes
Degraded -> Warning
Failed -> Critical
check_port_fc : Check status of FC ports
loss_sync -> Warning
config_wait -> Warning
login_wait -> Warning
non_participate -> Warning
error -> Critical
check_cap_ssd : Check used SSD capacity
>= $PCWARNINGSSD -> Warning
>= $PCCRITICALSSD -> Critical
check_cap_fc : Check used FC capacity
>= $PCWARNINGFC -> Warning
>= $PCCRITICALFC -> Critical
check_cap_nl : Check used NL capacity
>= $PCWARNINGNL -> Warning
>= $PCCRITICALNL -> Critical
check_ps_node : Check Power Supply Node
Degraded -> Warning
Failed -> Critical
check_ps_cage : Check Power Supply Cage
Degraded -> Warning
Failed -> Critical
check_qw : Check status of quorum witness
loss_sync -> Critical
error -> Critical
check_pd : Check status of physical disks
Degraded -> Warning
Failed -> Critical
check_node : Check status of controller nodes
Degraded -> Warning
Failed -> Critical
check_ld : Check status of logical disks
Degraded -> Warning
Failed -> Critical
check_vv : Check status of virtual volumes
Degraded -> Warning
Failed -> Critical
check_port_fc : Check status of FC ports
loss_sync -> Warning
config_wait -> Warning
login_wait -> Warning
non_participate -> Warning
error -> Critical
check_cap_ssd : Check used SSD capacity
>= 80 -> Warning
>= 90 -> Critical
check_cap_fc : Check used FC capacity
>= 80 -> Warning
>= 90 -> Critical
check_cap_nl : Check used NL capacity
>= 80 -> Warning
>= 90 -> Critical
check_ps_node : Check Power Supply Node
Degraded -> Warning
Failed -> Critical
check_ps_cage : Check Power Supply Cage
Degraded -> Warning
Failed -> Critical
check_volume <VOLUMENAME> : Check status of volume
Degraded -> Warning
Failed -> Critical
check_qw <QWIP> : Check status of quorum witness
loss_sync -> Critical
error -> Critical
```

## Usage in Nagios

Copy file `check_3par` to Nagios plugins directory (for example `/usr/lib/nagios/plugins/`).

Copy file `3par.cfg` to Nagios `conf.d` directory (for example `/etc/nagios/conf.d`).

Read `3par.cfg` and adjust it to your needs and restart nagios `service nagios restart`


0 comments on commit 2d8818d

Please sign in to comment.