Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storcli.py generate no metrics #77

Open
DavideM78 opened this issue Dec 7, 2020 · 6 comments
Open

storcli.py generate no metrics #77

DavideM78 opened this issue Dec 7, 2020 · 6 comments

Comments

@DavideM78
Copy link

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

@dswarbrick
Copy link
Member

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.

@SckyzO
Copy link

SckyzO commented Jan 13, 2021

@DavideM78 Do you use script with sudo user ?

@frenkye
Copy link

frenkye commented Mar 18, 2021

@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

@stefangweichinger
Copy link

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.

@stefangweichinger
Copy link

Tried #94 without success.

@stefangweichinger
Copy link

#95 helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants