Skip to content

Commit

Permalink
Initial commit to get some perfsonar prometheus stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
arlake228 committed Dec 19, 2023
1 parent 7597cbc commit 441073e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions perfsonar-host-metrics/perfsonar-host-metrics/perfsonar_metrics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3

from psconfig.utilities.metrics import PSConfigMetricCalculator
from psconfig.utilities.cli import PSCONFIG_CLI_AGENTS

##
# pSConfig Metrics
for psconfig_agent in PSCONFIG_CLI_AGENTS:
#Try each agent, but don't exit if exception since agent may not be installed
try:
psconfig_calculator = PSConfigMetricCalculator(psconfig_agent["name"].lower())
psconfig_metrics = psconfig_calculator.run_metrics()
if psconfig_metrics.guid:
print(psconfig_metrics.to_prometheus())
except:
pass
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Homepage: http://www.perfsonar.net
Package: perfsonar-host-metrics
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, prometheus-node-exporter,
openssl, apache2, apache2-ssl-dev, perfsonar-common
openssl, apache2, apache2-ssl-dev, perfsonar-common, python-perfsonar-psconfig
Description: Prometheus node-exporter integration with perfSONAR
A package that installs and sets-up Prometheus node_exporter for a perfSONAR
to collect and report host metrics.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BuildArch: noarch
Requires: perfsonar-common
Requires: openssl
Requires: prometheus-node-exporter
Requires: python-perfsonar-psconfig
Requires: httpd
Requires: mod_ssl
Requires: selinux-policy-%{selinuxtype}
Expand Down

0 comments on commit 441073e

Please sign in to comment.