add RAID controller checks

This commit is contained in:
buchel_k committed 2025-05-12 13:34:59 +02:00
1 parent 4af202972a
commit 29e6a11221
1 file changed
+127 -76
+127 -76
View File
@@ -172,6 +172,98 @@ dmesg --clear
## Extra Checks
### Fully Custom Checks
If none of the existing extra checks more below suit your needs, you may create a fully custom check.
To do so the command or service template used needs to be available/configured by some other means on the Icinga Master. The check plugin executed on the Icinga Satellite or by the Icinga agent needs also to be already available or distributed by other means. So please reach out to the [Linux Team](mailto:linux-eng@psi.ch) to check how to do it best and to ensure that all is in place.
```
icinga2::custom_service:
'My Service Check 1':
template: st-agent-lf-file-size
vars:
criticality: 'B'
file_size_filename: '/var/my/growing/file'
file_size_warning = '100M'
file_size_critical = '200M'
'My Service Check 2':
command: 'tcp'
agent: false
vars:
criticality: 'A'
tcp_port: 3389
perf_data: true
```
Below `icinga2::custom_service` set the name of the service/service check as it will be seen in Icingaweb. Then the possible arguments are
- `command` to issue a check command
- `template` to inherit from given service template
- `agent` shall the `command` run on the agent or the satellite, only if `themplate` is not set, default is `true`
- `vars` hash with arguments for the service check
- `perf_data` if performance data should be recorded and performance graph should be shown, default is `false`
You are free in the use of the actual service name, it only needs to be unique.
### External Connection Checks (Active Checks)
This can be implemented by a full custom check, like below example which test if an RDP port can be reached:
```
icinga2::custom_service:
'RDP Access':
command: 'tcp'
agent: false
perf_data: true
vars:
criticality: 'A'
tcp_port: 3389
```
Possible commands are [`http`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-http), [`tcp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-tcp), [`udp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-udp), [`ssl`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ssl), [`ssh`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ssh) or [`ftp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ftp).
Note if you want to reference the hostname, you might use a macro, e.g.:
```
http_vhost: '$host.name$'
```
Note that macros only work for check command arguments.
The actual service name is up to you, it only needs to be unique.
### Check for Systemd Service Status
To check if a daemon or service has been successfully started by `systemd` configure a custom service using the `st-agent-awi-lx-service-active` template:
```
icinga2::custom_service:
'XRDP Active':
template: 'st-agent-awi-lx-service-active'
vars:
criticality: 'A'
service_names:
- 'xrdp'
- 'xrdp-sesman'
```
The name (here `XRDP Active`) needs to be unique over all Icinga "services" of a single host.
The `service_names` variable needs to contain one or more name of `systemd` services to be monitored.
You can create multiple of these checks.
Alternatively a more detailed configuration of a systemd unit state check can be done with the `st-agent-lf-systemd-unit` template:
```
icinga2::custom_service:
'Last Puppet Run':
template: 'st-agent-lf-systemd-unit'
vars:
systemd_unit_unit: 'pli-puppet-run'
systemd_unit_activestate: ['active', 'inactive']
systemd_unit_unitfilestate: 'static'
criticality: 'A'
```
### TLS/SSL Certificate Expiration
To monitor the expiration of one or more certificates you need to give the node in Hiera the additional server role `ssl-cert` (except for `role::jupyterserver`):
@@ -207,38 +299,6 @@ icinga2::service_check::customize:
Here the warning is below 180 days and below 30 days is critical by default.
### Check for Systemd Service Status
To check if a daemon or service has been successfully started by `systemd` configure a custom service using the `st-agent-awi-lx-service-active` template:
```
icinga2::custom_service:
'XRDP Active':
template: 'st-agent-awi-lx-service-active'
vars:
criticality: 'A'
service_names:
- 'xrdp'
- 'xrdp-sesman'
```
The name (here `XRDP Active`) needs to be unique over all Icinga "services" of a single host.
The `service_names` variable needs to contain one or more name of `systemd` services to be monitored.
You can create multiple of these checks.
Alternatively a more detailed configuration of a systemd unit state check can be done with the `st-agent-lf-systemd-unit` template:
```
icinga2::custom_service:
'Last Puppet Run':
template: 'st-agent-lf-systemd-unit'
vars:
systemd_unit_unit: 'pli-puppet-run'
systemd_unit_activestate: ['active', 'inactive']
systemd_unit_unitfilestate: 'static'
criticality: 'A'
```
### HPE ProLiant Hardware Check
This check is automatically enabled on this type of hardware.
@@ -253,58 +313,49 @@ You can opt out with
platform::hpe::enable_hw_check: false
```
### External Connection Checks (Active Checks)
### HP Smart Array RAID Controller Check
This check is automatically enabled.
For this we have fully custom service checks.
### LSI RAID Controller Check
Below example is for a RDP port:
This check is enabled automatically with Hiera configuration `base::enable_lsi_raid: true`.
Following check specifc variables can be set:
```
icinga2::custom_service:
'RDP Access':
command: 'tcp'
agent: false
perf_data: true
vars:
criticality: 'A'
tcp_port: 3389
lsi_raid_controller
lsi_raid_enclosure
lsi_raid_logicaldevice
lsi_raid_physicaldevice
lsi_raid_temperature_warning
lsi_raid_temperature_critical
lsi_raid_physicaldevicetemperature_warning
lsi_raid_physicaldevicetemperature_critical
lsi_raid_bbutemperature_warning
lsi_raid_bbutemperature_critical
lsi_raid_cvtemperature_warning
lsi_raid_cvtemperature_critical
lsi_raid_ignore_media_errors
lsi_raid_ignore_other_errors
lsi_raid_ignore_predictive_fail_count
lsi_raid_ignore_shield_counter
lsi_raid_ignore_bbm_counter
lsi_raid_storcli_path
lsi_raid_BBU
lsi_raid_noenclosures
lsi_raid_nowritebackok
lsi_raid_noconsistencyok
```
Possible commands are [`http`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-http), [`tcp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-tcp), [`udp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-udp), [`ssl`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ssl), [`ssh`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ssh) or [`ftp`](https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#plugin-check-command-ftp).
Note if you want to reference the hostname, you might use a macro, e.g.:
e.g. like
```
http_vhost: '$host.name$'
icinga2::service_check::customize:
'LSI RAID Controller':
criticality: 'B'
lsi_raid_ignore_other_errors: 60
```
Note that macros only work for check command arguments.
The actual service name is up to you, it only needs to be unique.
### Other Custom Checks
It is possible to create a very custom check. But note the command or service template used needs to be available/configured by some other means on the Icinga Master. The check plugin executed on the Icinga Satellite or by the Icinga agent needs also to be already available or distributed by other means. So please reach out to the [Linux Team](mailto:linux-eng@psi.ch) to check how to do it best and to ensure that all is in place.
Unfortunately these variables are not visible in the web UI as they by default are not set to a specific value in the template. For details and documentation check out the [project on Github](https://github.com/thomas-krenn/check_lsi_raid) or the help:
```
icinga2::custom_service:
'My Service Check 1':
template: st-agent-lf-file-size
vars:
criticality: 'B'
file_size_filename: '/var/my/growing/file'
file_size_warning = '100M'
file_size_critical = '200M'
'My Service Check 2':
command: 'tcp'
agent: false
vars:
criticality: 'A'
tcp_port: 3389
perf_data: true
/usr/lib64/nagios/plugins/check_lsi_raid --help
```
Below `icinga2::custom_service` set the name of the service/service check as it will be seen in Icingaweb. Then the possible arguments are
- `command` to issue a check command
- `template` to inherit from given service template
- `agent` shall the `command` run on the agent or the satellite, only if `themplate` is not set, default is `true`
- `vars` hash with arguments for the service check
- `perf_data` if performance data should be recorded and performance graph should be shown, default is `false`
You are free in the use of the actual service name, it only needs to be unique.