Skip to main content

alom_exporter

This connects to an instance of Sun Advanced Lights-Out Management (ALOM) via SSH and exports metrics about the host system to Prometheus! It has been tested on Sun T1000 and T2000 systems so far- please try it with your system and file a bug if it's not compatible. It is currently focused on showenvironment metrics: voltage/amperage/temperature, for safety and environmental monitoring. The system running this exporter requires the following:

  • python3
  • Network access to the management interface of your target server
  • Credentials for logging into the target server in a configuration file, like the following:
alom_ssh_address: '192.168.1.231'
alom_ssh_username: admin
alom_ssh_password: changeme

This file is YAML-formatted and is passed to the alom_exporter script with the -c/--config option.

Since the showenvironment command doesn't require administrative privileges, I'd recommend setting up a dedicated user for alom_exporter to adhere to the principle of least privilege.

For example, here's how to add an unprivileged user to an ALOM console.

sc> useradd exporter
sc> userpassword exporter
New password: *********

Re-enter new password: *********

sc> usershow exporter
Username         Permissions      Password
exporter         ----             Assigned

Make sure the username and password entered at the console match what you entered in the config.yaml file.

Installation

Install via pip, pip install alom-exporter - and note the package name uses a dash. The daemon can be invoked with alom_exporter.

Example

This was generated from example output of a Sun T2000 server. Python metrics are omitted for brevity.

# HELP alom_system_temperature Current temperature of system sensors
# TYPE alom_system_temperature gauge
alom_system_temperature{sensor="PDB/T_AMB"} 24.0
alom_system_temperature{sensor="MB/T_AMB"} 28.0
alom_system_temperature{sensor="MB/CMP0/T_TCORE"} 44.0
alom_system_temperature{sensor="MB/CMP0/T_BCORE"} 44.0
alom_system_temperature{sensor="IOBD/IOB/TCORE"} 43.0
alom_system_temperature{sensor="IOBD/T_AMB"} 29.0
# HELP alom_fan_speed Current speed of cooling fans in RPM
# TYPE alom_fan_speed gauge
alom_fan_speed{sensor="FT0/FM0"} 3586.0
alom_fan_speed{sensor="FT0/FM1"} 3525.0
alom_fan_speed{sensor="FT0/FM2"} 3650.0
alom_fan_speed{sensor="FT2"} 2455.0
# HELP alom_voltage_status Current voltage at sensors across the machine
# TYPE alom_voltage_status gauge
alom_voltage_status{sensor="MB/V_+1V5"} 1.48
alom_voltage_status{sensor="MB/V_VMEML"} 1.79
alom_voltage_status{sensor="MB/V_VMEMR"} 1.78
alom_voltage_status{sensor="MB/V_VTTL"} 0.89
alom_voltage_status{sensor="MB/V_VTTR"} 0.89
alom_voltage_status{sensor="MB/V_+3V3STBY"} 3.39
alom_voltage_status{sensor="MB/V_VCORE"} 1.31
alom_voltage_status{sensor="IOBD/V_+1V5"} 1.48
alom_voltage_status{sensor="IOBD/V_+1V8"} 1.79
alom_voltage_status{sensor="IOBD/V_+3V3MAIN"} 3.36
alom_voltage_status{sensor="IOBD/V_+3V3STBY"} 3.41
alom_voltage_status{sensor="IOBD/V_+1V"} 1.11
alom_voltage_status{sensor="IOBD/V_+1V2"} 1.17
alom_voltage_status{sensor="IOBD/V_+5V"} 5.15
alom_voltage_status{sensor="IOBD/V_-12V"} -12.04
alom_voltage_status{sensor="IOBD/V_+12V"} 12.18
alom_voltage_status{sensor="SC/BAT/V_BAT"} 3.06
# HELP alom_system_load Current system load in amps
# TYPE alom_system_load gauge
alom_system_load{sensor="MB/I_VCORE"} 34.64
alom_system_load{sensor="MB/I_VMEML"} 7.56
alom_system_load{sensor="MB/I_VMEMR"} 6.42
# HELP alom_sensor_status Status of current sensors
# TYPE alom_sensor_status gauge
alom_sensor_status{sensor="IOBD/I_USB0"} 1.0
alom_sensor_status{sensor="IOBD/I_USB1"} 1.0
alom_sensor_status{sensor="FIOBD/I_USB"} 1.0
# HELP alom_power_supply_status Status of power supplies
# TYPE alom_power_supply_status gauge
alom_power_supply_status{supply="PS0"} 1.0
alom_power_supply_status{supply="PS1"} 1.0
# HELP alom_ok Scraping status from ALOM
# TYPE alom_ok gauge
alom_ok 1.0
# HELP alom_system_power System power status
# TYPE alom_system_power gauge
alom_system_power 1.0

Some examples in this repo's test suite are from this official Sun documentation.

License

GPLv3 - a copy is included with this software as LICENSE.txt

We need some type of file logging.

OSError: Socket is closed ^CTraceback (most recent call last): File "/usr/local/lib/python3.7/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/home/delucks/.local/lib/python3.7/site-packages/prometheus_client/exposition.py", line 52, in prometheus_app status, header, output = _bake_output(registry, accept_header, params) File "/home/delucks/.local/lib/python3.7/site-packages/prometheus_client/exposition.py", line 40, in _bake_output output = encoder(registry) File "/home/delucks/.local/lib/python3.7/site-packages/prometheus_client/openmetrics/exposition.py", line 14, in generate_latest for metric in registry.collect(): File "/home/delucks/.local/lib/python3.7/site-packages/prometheus_client/registry.py", line 82, in collect for metric in collector.collect(): File "/home/delucks/.local/lib/python3.7/site-packages/alom/metrics.py", line 57, in collect env = self.connection.showenvironment() File "/home/delucks/.local/lib/python3.7/site-packages/alom/ssh.py", line 89, in showenvironment sent = self.channel.send('showenvironment\n') File "/home/delucks/.local/lib/python3.7/site-packages/paramiko/channel.py", line 801, in send return self._send(s, m) File "/home/delucks/.local/lib/python3.7/site-packages/paramiko/channel.py", line 1198, in _send raise socket.error("Socket is closed") OSError: Socket is closed Traceback (most recent call last): File "/home/delucks/.local/bin/alom_exporter", line 10, in sys.exit(main()) File "/home/delucks/.local/lib/python3.7/site-packages/alom/metrics.py", line 93, in main time.sleep(10) KeyboardInterrupt

Metadata

Release files for alom-exporter 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alom-exporter 0.0.7
File Size Uploaded Provenance Actions
alom_exporter-0.0.7.tar.gz 13.5 kB Without provenance Details for alom_exporter-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alom-exporter 0.0.7
File Interpreter ABI Platform Actions
alom_exporter-0.0.7-py3-none-any.whl Python 3 none any Details for alom_exporter-0.0.7-py3-none-any.whl

Total release size: 36.3 kB

Release files / alom_exporter-0.0.7.tar.gz

Download URL alom_exporter-0.0.7.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3efeda802af85ebbf03c9c607321742c3b2ba83e5bf08da56321b8e8304a4f7b
BLAKE2b-256 checksum
How to use checksums
222eaab8ee77b04e6ad2ce4b6b44287edfaf98b938e3033e3fd9f04c7cf9adf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

Release files / alom_exporter-0.0.7-py3-none-any.whl

Download URL alom_exporter-0.0.7-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa530a8b3459271e0b6f9373acde1b212b84d4e85c1a8d66bc5bc8dbf4db2b8b
BLAKE2b-256 checksum
How to use checksums
86f2de28dd0c04e077cdb6dba9e037a7089fbae18a9509cd6f8559cb7b6d410a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

Security for alom-exporter 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page