summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/hpssa
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/hpssa')
-rw-r--r--collectors/python.d.plugin/hpssa/Makefile.inc13
l---------collectors/python.d.plugin/hpssa/README.md1
-rw-r--r--collectors/python.d.plugin/hpssa/hpssa.chart.py396
-rw-r--r--collectors/python.d.plugin/hpssa/hpssa.conf61
-rw-r--r--collectors/python.d.plugin/hpssa/integrations/hp_smart_storage_arrays.md205
-rw-r--r--collectors/python.d.plugin/hpssa/metadata.yaml185
6 files changed, 0 insertions, 861 deletions
diff --git a/collectors/python.d.plugin/hpssa/Makefile.inc b/collectors/python.d.plugin/hpssa/Makefile.inc
deleted file mode 100644
index 1c04aa49c..000000000
--- a/collectors/python.d.plugin/hpssa/Makefile.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# THIS IS NOT A COMPLETE Makefile
-# IT IS INCLUDED BY ITS PARENT'S Makefile.am
-# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
-
-# install these files
-dist_python_DATA += hpssa/hpssa.chart.py
-dist_pythonconfig_DATA += hpssa/hpssa.conf
-
-# do not install these files, but include them in the distribution
-dist_noinst_DATA += hpssa/README.md hpssa/Makefile.inc
-
diff --git a/collectors/python.d.plugin/hpssa/README.md b/collectors/python.d.plugin/hpssa/README.md
deleted file mode 120000
index 82802d8b4..000000000
--- a/collectors/python.d.plugin/hpssa/README.md
+++ /dev/null
@@ -1 +0,0 @@
-integrations/hp_smart_storage_arrays.md \ No newline at end of file
diff --git a/collectors/python.d.plugin/hpssa/hpssa.chart.py b/collectors/python.d.plugin/hpssa/hpssa.chart.py
deleted file mode 100644
index 66be00837..000000000
--- a/collectors/python.d.plugin/hpssa/hpssa.chart.py
+++ /dev/null
@@ -1,396 +0,0 @@
-# -*- coding: utf-8 -*-
-# Description: hpssa netdata python.d module
-# Author: Peter Gnodde (gnoddep)
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-import os
-import re
-from copy import deepcopy
-
-from bases.FrameworkServices.ExecutableService import ExecutableService
-from bases.collection import find_binary
-
-disabled_by_default = True
-update_every = 5
-
-ORDER = [
- 'ctrl_status',
- 'ctrl_temperature',
- 'ld_status',
- 'pd_status',
- 'pd_temperature',
-]
-
-CHARTS = {
- 'ctrl_status': {
- 'options': [
- None,
- 'Status 1 is OK, Status 0 is not OK',
- 'Status',
- 'Controller',
- 'hpssa.ctrl_status',
- 'line'
- ],
- 'lines': []
- },
- 'ctrl_temperature': {
- 'options': [
- None,
- 'Temperature',
- 'Celsius',
- 'Controller',
- 'hpssa.ctrl_temperature',
- 'line'
- ],
- 'lines': []
- },
- 'ld_status': {
- 'options': [
- None,
- 'Status 1 is OK, Status 0 is not OK',
- 'Status',
- 'Logical drives',
- 'hpssa.ld_status',
- 'line'
- ],
- 'lines': []
- },
- 'pd_status': {
- 'options': [
- None,
- 'Status 1 is OK, Status 0 is not OK',
- 'Status',
- 'Physical drives',
- 'hpssa.pd_status',
- 'line'
- ],
- 'lines': []
- },
- 'pd_temperature': {
- 'options': [
- None,
- 'Temperature',
- 'Celsius',
- 'Physical drives',
- 'hpssa.pd_temperature',
- 'line'
- ],
- 'lines': []
- }
-}
-
-adapter_regex = re.compile(r'^(?P<adapter_type>.+) in Slot (?P<slot>\d+)')
-ignored_sections_regex = re.compile(
- r'''
- ^
- Physical[ ]Drives
- | None[ ]attached
- | (?:Expander|Enclosure|SEP|Port[ ]Name:)[ ].+
- | .+[ ]at[ ]Port[ ]\S+,[ ]Box[ ]\d+,[ ].+
- | Mirror[ ]Group[ ]\d+:
- $
- ''',
- re.X
-)
-mirror_group_regex = re.compile(r'^Mirror Group \d+:$')
-disk_partition_regex = re.compile(r'^Disk Partition Information$')
-array_regex = re.compile(r'^Array: (?P<id>[A-Z]+)$')
-drive_regex = re.compile(
- r'''
- ^
- Logical[ ]Drive:[ ](?P<logical_drive_id>\d+)
- | physicaldrive[ ](?P<fqn>[^:]+:\d+:\d+)
- $
- ''',
- re.X
-)
-key_value_regex = re.compile(r'^(?P<key>[^:]+): ?(?P<value>.*)$')
-ld_status_regex = re.compile(r'^Status: (?P<status>[^,]+)(?:, (?P<percentage>[0-9.]+)% complete)?$')
-error_match = re.compile(r'Error:')
-
-
-class HPSSAException(Exception):
- pass
-
-
-class HPSSA(object):
- def __init__(self, lines):
- self.lines = [line.strip() for line in lines if line.strip()]
- self.current_line = 0
- self.adapters = []
- self.parse()
-
- def __iter__(self):
- return self
-
- def __next__(self):
- if self.current_line == len(self.lines):
- raise StopIteration
-
- line = self.lines[self.current_line]
- self.current_line += 1
-
- return line
-
- def next(self):
- """
- This is for Python 2.7 compatibility
- """
- return self.__next__()
-
- def rewind(self):
- self.current_line = max(self.current_line - 1, 0)
-
- @staticmethod
- def match_any(line, *regexes):
- return any([regex.match(line) for regex in regexes])
-
- def parse(self):
- for line in self:
- match = adapter_regex.match(line)
- if match:
- self.adapters.append(self.parse_adapter(**match.groupdict()))
-
- def parse_adapter(self, slot, adapter_type):
- adapter = {
- 'slot': int(slot),
- 'type': adapter_type,
-
- 'controller': {
- 'status': None,
- 'temperature': None,
- },
- 'cache': {
- 'present': False,
- 'status': None,
- 'temperature': None,
- },
- 'battery': {
- 'status': None,
- 'count': 0,
- },
-
- 'logical_drives': [],
- 'physical_drives': [],
- }
-
- for line in self:
- if error_match.match(line):
- raise HPSSAException('Error: {}'.format(line))
- elif adapter_regex.match(line):
- self.rewind()
- break
- elif array_regex.match(line):
- self.parse_array(adapter)
- elif line in ('Unassigned', 'unassigned') or line == 'HBA Drives':
- self.parse_physical_drives(adapter)
- elif ignored_sections_regex.match(line):
- self.parse_ignored_section()
- else:
- match = key_value_regex.match(line)
- if match:
- key, value = match.group('key', 'value')
- if key == 'Controller Status':
- adapter['controller']['status'] = value == 'OK'
- elif key == 'Controller Temperature (C)':
- adapter['controller']['temperature'] = int(value)
- elif key == 'Cache Board Present':
- adapter['cache']['present'] = value == 'True'
- elif key == 'Cache Status':
- adapter['cache']['status'] = value == 'OK'
- elif key == 'Cache Module Temperature (C)':
- adapter['cache']['temperature'] = int(value)
- elif key == 'Battery/Capacitor Count':
- adapter['battery']['count'] = int(value)
- elif key == 'Battery/Capacitor Status':
- adapter['battery']['status'] = value == 'OK'
- else:
- raise HPSSAException('Cannot parse line: {}'.format(line))
-
- return adapter
-
- def parse_array(self, adapter):
- for line in self:
- if HPSSA.match_any(line, adapter_regex, array_regex, ignored_sections_regex):
- self.rewind()
- break
-
- match = drive_regex.match(line)
- if match:
- data = match.groupdict()
- if data['logical_drive_id']:
- self.parse_logical_drive(adapter, int(data['logical_drive_id']))
- else:
- self.parse_physical_drive(adapter, data['fqn'])
- elif not key_value_regex.match(line):
- self.rewind()
- break
-
- def parse_physical_drives(self, adapter):
- for line in self:
- match = drive_regex.match(line)
- if match:
- self.parse_physical_drive(adapter, match.group('fqn'))
- else:
- self.rewind()
- break
-
- def parse_logical_drive(self, adapter, logical_drive_id):
- ld = {
- 'id': logical_drive_id,
- 'status': None,
- 'status_complete': None,
- }
-
- for line in self:
- if HPSSA.match_any(line, mirror_group_regex, disk_partition_regex):
- self.parse_ignored_section()
- continue
-
- match = ld_status_regex.match(line)
- if match:
- ld['status'] = match.group('status') == 'OK'
-
- if match.group('percentage'):
- ld['status_complete'] = float(match.group('percentage')) / 100
- elif HPSSA.match_any(line, adapter_regex, array_regex, drive_regex, ignored_sections_regex) \
- or not key_value_regex.match(line):
- self.rewind()
- break
-
- adapter['logical_drives'].append(ld)
-
- def parse_physical_drive(self, adapter, fqn):
- pd = {
- 'fqn': fqn,
- 'status': None,
- 'temperature': None,
- }
-
- for line in self:
- if HPSSA.match_any(line, adapter_regex, array_regex, drive_regex, ignored_sections_regex):
- self.rewind()
- break
-
- match = key_value_regex.match(line)
- if match:
- key, value = match.group('key', 'value')
- if key == 'Status':
- pd['status'] = value == 'OK'
- elif key == 'Current Temperature (C)':
- pd['temperature'] = int(value)
- else:
- self.rewind()
- break
-
- adapter['physical_drives'].append(pd)
-
- def parse_ignored_section(self):
- for line in self:
- if HPSSA.match_any(line, adapter_regex, array_regex, drive_regex, ignored_sections_regex) \
- or not key_value_regex.match(line):
- self.rewind()
- break
-
-
-class Service(ExecutableService):
- def __init__(self, configuration=None, name=None):
- super(Service, self).__init__(configuration=configuration, name=name)
- self.order = ORDER
- self.definitions = deepcopy(CHARTS)
- self.ssacli_path = self.configuration.get('ssacli_path', 'ssacli')
- self.use_sudo = self.configuration.get('use_sudo', True)
- self.cmd = []
-
- def get_adapters(self):
- try:
- adapters = HPSSA(self._get_raw_data(command=self.cmd)).adapters
- if not adapters:
- # If no adapters are returned, run the command again but capture stderr
- err = self._get_raw_data(command=self.cmd, stderr=True)
- if err:
- raise HPSSAException('Error executing cmd {}: {}'.format(' '.join(self.cmd), '\n'.join(err)))
- return adapters
- except HPSSAException as ex:
- self.error(ex)
- return []
-
- def check(self):
- if not os.path.isfile(self.ssacli_path):
- ssacli_path = find_binary(self.ssacli_path)
- if ssacli_path:
- self.ssacli_path = ssacli_path
- else:
- self.error('Cannot locate "{}" binary'.format(self.ssacli_path))
- return False
-
- if self.use_sudo:
- sudo = find_binary('sudo')
- if not sudo:
- self.error('Cannot locate "{}" binary'.format('sudo'))
- return False
-
- allowed = self._get_raw_data(command=[sudo, '-n', '-l', self.ssacli_path])
- if not allowed or allowed[0].strip() != os.path.realpath(self.ssacli_path):
- self.error('Not allowed to run sudo for command {}'.format(self.ssacli_path))
- return False
-
- self.cmd = [sudo, '-n']
-
- self.cmd.extend([self.ssacli_path, 'ctrl', 'all', 'show', 'config', 'detail'])
- self.info('Command: {}'.format(self.cmd))
-
- adapters = self.get_adapters()
-
- self.info('Discovered adapters: {}'.format([adapter['type'] for adapter in adapters]))
- if not adapters:
- self.error('No adapters discovered')
- return False
-
- return True
-
- def get_data(self):
- netdata = {}
-
- for adapter in self.get_adapters():
- status_key = '{}_status'.format(adapter['slot'])
- temperature_key = '{}_temperature'.format(adapter['slot'])
- ld_key = 'ld_{}_'.format(adapter['slot'])
-
- data = {
- 'ctrl_status': {
- 'ctrl_' + status_key: adapter['controller']['status'],
- 'cache_' + status_key: adapter['cache']['present'] and adapter['cache']['status'],
- 'battery_' + status_key:
- adapter['battery']['status'] if adapter['battery']['count'] > 0 else None
- },
-
- 'ctrl_temperature': {
- 'ctrl_' + temperature_key: adapter['controller']['temperature'],
- 'cache_' + temperature_key: adapter['cache']['temperature'],
- },
-
- 'ld_status': {
- ld_key + '{}_status'.format(ld['id']): ld['status'] for ld in adapter['logical_drives']
- },
-
- 'pd_status': {},
- 'pd_temperature': {},
- }
-
- for pd in adapter['physical_drives']:
- pd_key = 'pd_{}_{}'.format(adapter['slot'], pd['fqn'])
- data['pd_status'][pd_key + '_status'] = pd['status']
- data['pd_temperature'][pd_key + '_temperature'] = pd['temperature']
-
- for chart, dimension_data in data.items():
- for dimension_id, value in dimension_data.items():
- if value is None:
- continue
-
- if dimension_id not in self.charts[chart]:
- self.charts[chart].add_dimension([dimension_id])
-
- netdata[dimension_id] = value
-
- return netdata
diff --git a/collectors/python.d.plugin/hpssa/hpssa.conf b/collectors/python.d.plugin/hpssa/hpssa.conf
deleted file mode 100644
index cc50c9836..000000000
--- a/collectors/python.d.plugin/hpssa/hpssa.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-# netdata python.d.plugin configuration for hpssa
-#
-# This file is in YaML format. Generally the format is:
-#
-# name: value
-#
-
-# ----------------------------------------------------------------------
-# Global Variables
-# These variables set the defaults for all JOBs, however each JOB
-# may define its own, overriding the defaults.
-
-# update_every sets the default data collection frequency.
-# If unset, the python.d.plugin default is used.
-# update_every: 5
-
-# priority controls the order of charts at the netdata dashboard.
-# Lower numbers move the charts towards the top of the page.
-# If unset, the default for python.d.plugin is used.
-# priority: 60000
-
-# penalty indicates whether to apply penalty to update_every in case of failures.
-# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
-# penalty: yes
-
-# autodetection_retry sets the job re-check interval in seconds.
-# The job is not deleted if check fails.
-# Attempts to start the job are made once every autodetection_retry.
-# This feature is disabled by default.
-# autodetection_retry: 0
-
-# ----------------------------------------------------------------------
-# JOBS (data collection sources)
-#
-# The default JOBS share the same *name*. JOBS with the same name
-# are mutually exclusive. Only one of them will be allowed running at
-# any time. This allows autodetection to try several alternatives and
-# pick the one that works.
-#
-# Any number of jobs is supported.
-#
-# All python.d.plugin JOBS (for all its modules) support a set of
-# predefined parameters. These are:
-#
-# job_name:
-# name: myname # the JOB's name as it will appear at the
-# # dashboard (by default is the job_name)
-# # JOBs sharing a name are mutually exclusive
-# update_every: 5 # the JOB's data collection frequency
-# priority: 60000 # the JOB's order on the dashboard
-# penalty: yes # the JOB's penalty
-# autodetection_retry: 0 # the JOB's re-check interval in seconds
-#
-# Additionally to the above, hpssa also supports the following:
-#
-# ssacli_path: /usr/sbin/ssacli # The path to the ssacli executable
-# use_sudo: True # Whether to use sudo or not
-# ----------------------------------------------------------------------
-
-# ssacli_path: /usr/sbin/ssacli
-# use_sudo: True
diff --git a/collectors/python.d.plugin/hpssa/integrations/hp_smart_storage_arrays.md b/collectors/python.d.plugin/hpssa/integrations/hp_smart_storage_arrays.md
deleted file mode 100644
index d46cc9065..000000000
--- a/collectors/python.d.plugin/hpssa/integrations/hp_smart_storage_arrays.md
+++ /dev/null
@@ -1,205 +0,0 @@
-<!--startmeta
-custom_edit_url: "https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/hpssa/README.md"
-meta_yaml: "https://github.com/netdata/netdata/edit/master/collectors/python.d.plugin/hpssa/metadata.yaml"
-sidebar_label: "HP Smart Storage Arrays"
-learn_status: "Published"
-learn_rel_path: "Data Collection/Storage, Mount Points and Filesystems"
-most_popular: False
-message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
-endmeta-->
-
-# HP Smart Storage Arrays
-
-
-<img src="https://netdata.cloud/img/hp.svg" width="150"/>
-
-
-Plugin: python.d.plugin
-Module: hpssa
-
-<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
-
-## Overview
-
-This collector monitors HP Smart Storage Arrays metrics about operational statuses and temperatures.
-
-It uses the command line tool `ssacli`. The exact command used is `sudo -n ssacli ctrl all show config detail`
-
-This collector is supported on all platforms.
-
-This collector only supports collecting metrics from a single instance of this integration.
-
-
-### Default Behavior
-
-#### Auto-Detection
-
-If no configuration is provided, the collector will try to execute the `ssacli` binary.
-
-#### Limits
-
-The default configuration for this integration does not impose any limits on data collection.
-
-#### Performance Impact
-
-The default configuration for this integration is not expected to impose a significant performance impact on the system.
-
-
-## Metrics
-
-Metrics grouped by *scope*.
-
-The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
-
-
-
-### Per HP Smart Storage Arrays instance
-
-These metrics refer to the entire monitored application.
-
-This scope has no labels.
-
-Metrics:
-
-| Metric | Dimensions | Unit |
-|:------|:----------|:----|
-| hpssa.ctrl_status | ctrl_{adapter slot}_status, cache_{adapter slot}_status, battery_{adapter slot}_status per adapter | Status |
-| hpssa.ctrl_temperature | ctrl_{adapter slot}_temperature, cache_{adapter slot}_temperature per adapter | Celsius |
-| hpssa.ld_status | a dimension per logical drive | Status |
-| hpssa.pd_status | a dimension per physical drive | Status |
-| hpssa.pd_temperature | a dimension per physical drive | Celsius |
-
-
-
-## Alerts
-
-There are no alerts configured by default for this integration.
-
-
-## Setup
-
-### Prerequisites
-
-#### Enable the hpssa collector
-
-The `hpssa` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
-
-```bash
-cd /etc/netdata # Replace this path with your Netdata config directory, if different
-sudo ./edit-config python.d.conf
-```
-
-Change the value of the `hpssa` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your system.
-
-
-#### Allow user netdata to execute `ssacli` as root.
-
-This module uses `ssacli`, which can only be executed by root. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `ssacli` as root without a password.
-
-- Add to your `/etc/sudoers` file:
-
-`which ssacli` shows the full path to the binary.
-
-```bash
-netdata ALL=(root) NOPASSWD: /path/to/ssacli
-```
-
-- Reset Netdata's systemd
- unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux
- distributions with systemd)
-
-The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `ssacli` using `sudo`.
-
-As the `root` user, do the following:
-
-```cmd
-mkdir /etc/systemd/system/netdata.service.d
-echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
-systemctl daemon-reload
-systemctl restart netdata.service
-```
-
-
-
-### Configuration
-
-#### File
-
-The configuration file name for this integration is `python.d/hpssa.conf`.
-
-
-You can edit the configuration file using the `edit-config` script from the
-Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory).
-
-```bash
-cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
-sudo ./edit-config python.d/hpssa.conf
-```
-#### Options
-
-There are 2 sections:
-
-* Global variables
-* One or more JOBS that can define multiple different instances to monitor.
-
-The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
-
-Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
-
-Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
-
-
-<details><summary>Config options</summary>
-
-| Name | Description | Default | Required |
-|:----|:-----------|:-------|:--------:|
-| update_every | Sets the default data collection frequency. | 5 | no |
-| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |
-| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |
-| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |
-| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | | no |
-| ssacli_path | Path to the `ssacli` command line utility. Configure this if `ssacli` is not in the $PATH | | no |
-| use_sudo | Whether or not to use `sudo` to execute `ssacli` | True | no |
-
-</details>
-
-#### Examples
-
-##### Local simple config
-
-A basic configuration, specyfing the path to `ssacli`
-
-```yaml
-local:
- ssacli_path: /usr/sbin/ssacli
-
-```
-
-
-## Troubleshooting
-
-### Debug Mode
-
-To troubleshoot issues with the `hpssa` collector, run the `python.d.plugin` with the debug option enabled. The output
-should give you clues as to why the collector isn't working.
-
-- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
- your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
-
- ```bash
- cd /usr/libexec/netdata/plugins.d/
- ```
-
-- Switch to the `netdata` user.
-
- ```bash
- sudo -u netdata -s
- ```
-
-- Run the `python.d.plugin` to debug the collector:
-
- ```bash
- ./python.d.plugin hpssa debug trace
- ```
-
-
diff --git a/collectors/python.d.plugin/hpssa/metadata.yaml b/collectors/python.d.plugin/hpssa/metadata.yaml
deleted file mode 100644
index 7871cc276..000000000
--- a/collectors/python.d.plugin/hpssa/metadata.yaml
+++ /dev/null
@@ -1,185 +0,0 @@
-plugin_name: python.d.plugin
-modules:
- - meta:
- plugin_name: python.d.plugin
- module_name: hpssa
- monitored_instance:
- name: HP Smart Storage Arrays
- link: 'https://buy.hpe.com/us/en/software/server-management-software/server-management-software/smart-array-management-software/hpe-smart-storage-administrator/p/5409020'
- categories:
- - data-collection.storage-mount-points-and-filesystems
- icon_filename: 'hp.svg'
- related_resources:
- integrations:
- list: []
- info_provided_to_referring_integrations:
- description: ''
- keywords:
- - storage
- - hp
- - hpssa
- - array
- most_popular: false
- overview:
- data_collection:
- metrics_description: 'This collector monitors HP Smart Storage Arrays metrics about operational statuses and temperatures.'
- method_description: 'It uses the command line tool `ssacli`. The exact command used is `sudo -n ssacli ctrl all show config detail`'
- supported_platforms:
- include: []
- exclude: []
- multi_instance: false
- additional_permissions:
- description: ''
- default_behavior:
- auto_detection:
- description: 'If no configuration is provided, the collector will try to execute the `ssacli` binary.'
- limits:
- description: ''
- performance_impact:
- description: ''
- setup:
- prerequisites:
- list:
- - title: 'Enable the hpssa collector'
- description: |
- The `hpssa` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
-
- ```bash
- cd /etc/netdata # Replace this path with your Netdata config directory, if different
- sudo ./edit-config python.d.conf
- ```
-
- Change the value of the `hpssa` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your system.
- - title: 'Allow user netdata to execute `ssacli` as root.'
- description: |
- This module uses `ssacli`, which can only be executed by root. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `ssacli` as root without a password.
-
- - Add to your `/etc/sudoers` file:
-
- `which ssacli` shows the full path to the binary.
-
- ```bash
- netdata ALL=(root) NOPASSWD: /path/to/ssacli
- ```
-
- - Reset Netdata's systemd
- unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux
- distributions with systemd)
-
- The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `ssacli` using `sudo`.
-
- As the `root` user, do the following:
-
- ```cmd
- mkdir /etc/systemd/system/netdata.service.d
- echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
- systemctl daemon-reload
- systemctl restart netdata.service
- ```
- configuration:
- file:
- name: python.d/hpssa.conf
- options:
- description: |
- There are 2 sections:
-
- * Global variables
- * One or more JOBS that can define multiple different instances to monitor.
-
- The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
-
- Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
-
- Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
- folding:
- title: "Config options"
- enabled: true
- list:
- - name: update_every
- description: Sets the default data collection frequency.
- default_value: 5
- required: false
- - name: priority
- description: Controls the order of charts at the netdata dashboard.
- default_value: 60000
- required: false
- - name: autodetection_retry
- description: Sets the job re-check interval in seconds.
- default_value: 0
- required: false
- - name: penalty
- description: Indicates whether to apply penalty to update_every in case of failures.
- default_value: yes
- required: false
- - name: name
- description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works.
- default_value: ''
- required: false
- - name: ssacli_path
- description: Path to the `ssacli` command line utility. Configure this if `ssacli` is not in the $PATH
- default_value: ''
- required: false
- - name: use_sudo
- description: Whether or not to use `sudo` to execute `ssacli`
- default_value: 'True'
- required: false
- examples:
- folding:
- enabled: false
- title: "Config"
- list:
- - name: Local simple config
- description: A basic configuration, specyfing the path to `ssacli`
- folding:
- enabled: false
- config: |
- local:
- ssacli_path: /usr/sbin/ssacli
- troubleshooting:
- problems:
- list: []
- alerts: []
- metrics:
- folding:
- title: Metrics
- enabled: false
- description: ""
- availability: []
- scopes:
- - name: global
- description: "These metrics refer to the entire monitored application."
- labels: []
- metrics:
- - name: hpssa.ctrl_status
- description: Status 1 is OK, Status 0 is not OK
- unit: "Status"
- chart_type: line
- dimensions:
- - name: ctrl_{adapter slot}_status
- - name: cache_{adapter slot}_status
- - name: battery_{adapter slot}_status per adapter
- - name: hpssa.ctrl_temperature
- description: Temperature
- unit: "Celsius"
- chart_type: line
- dimensions:
- - name: ctrl_{adapter slot}_temperature
- - name: cache_{adapter slot}_temperature per adapter
- - name: hpssa.ld_status
- description: Status 1 is OK, Status 0 is not OK
- unit: "Status"
- chart_type: line
- dimensions:
- - name: a dimension per logical drive
- - name: hpssa.pd_status
- description: Status 1 is OK, Status 0 is not OK
- unit: "Status"
- chart_type: line
- dimensions:
- - name: a dimension per physical drive
- - name: hpssa.pd_temperature
- description: Temperature
- unit: "Celsius"
- chart_type: line
- dimensions:
- - name: a dimension per physical drive