node-exporter-textfile-collector-scripts
node-exporter-textfile-collector-scripts copied to clipboard
storcli.py generate no metrics
Hi to everybody, I was trying to generate metrics with the script, only they are not generated. Trying to direct the output of the script to a normal text file makes it empty. Other scripts I installed work perfectly. Does anyone have any idea what it might be? Using python3 and storecli 1.21.06 Thanks to anybody wo will take a look.
Davide
You'll probably get more eyes on your problem by posting this to the prometheus-users mailing list / google group. Github issues are not really the best place for general tech support.
Your storcli version number sounds extremely old, is it should be something like 7.x.x.x. The storcli.py collector requires a version of storcli that can support JSON output.
@DavideM78 Do you use script with sudo user ?
@DavideM78 Was trying script now, ill will recomend change pass on error in def main()
and print actual error.
For me it printed only metric megaraid_controller_info
and then it ended up on error, because of line 79
if 'ROC temperature(Degree Celc' + 'ius)' in response['HwCfg'].keys():
response['HwCfg']['ROC temperature(Degree Celsius)'] = response['HwCfg'].pop(
'ROC temperature(Degree Celc' + 'ius)'
)
add_metric('temperature', baselabel, int(response['HwCfg']['ROC temperature(Degree Celsius)']))
the add_metric need to be inside of the if
I also don't get metrics.
Using "StorCli SAS Customization Utility Ver 007.1616.0000.0000" as /opt/hpe/storcli/storcli64
, and edited "storcli.py" accordingly.
No errors, only output is:
# /usr/local/bin/storcli.py
# HELP megaraid_controller_info MegaRAID controller info
# TYPE megaraid_controller_info gauge
megaraid_controller_info{controller="0",model="RAID Ctrl SAS 6G 0/1 (D2607)",serial="FW-2B5DCAT1AABWA",fwversion="2.130.354-2728"} 1.0
Trying to debug, /opt/hpe/storcli/storcli64 /cALL show all J
returns a long list with "Controllers:" inside.
Will try to dig deeper.
Tried https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/94 without success.
#95 helps