-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit to get some perfsonar prometheus stats.
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
perfsonar-host-metrics/perfsonar-host-metrics/perfsonar_metrics.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters