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

Added querie does not show up in metrics #34

Open
rqmartins73 opened this issue Apr 3, 2024 · 3 comments
Open

Added querie does not show up in metrics #34

rqmartins73 opened this issue Apr 3, 2024 · 3 comments

Comments

@rqmartins73
Copy link

Hi there ThePrez,

I added the bit below to the config.json file, but I'm not getting these metrics on prometheus.

{
  "name": "Disk Statistics",
  "interval": 20,
  "prefix": "DASD",
  "enabled": true,
  "sql": "SELECT ASP_NUMBER,UNIT_NUMBER,UNIT_STORAGE_CAPACITY,UNIT_SPACE_AVAILABLE,UNIT_SPACE_AVAILABLE_GB,PERCENT_USED FROM TABLE (QSYS2.SYSDISKSTAT('NO'))"
},

I confirmed it is using the config.json file, because if I renamed it it asks me to create a default one.

In the log file I don't see any related errors
Using config file: config.json
Verifying metrics collection....
Metrics collection verified.

Am I missing something?

Thanks in advance.
Regards.

@harwii
Copy link

harwii commented Aug 6, 2024

Hi, I encountered the exact same problem when adding new queries.

Is there a way to resolve this issue?

Regards,
Patrick

@krka01
Copy link

krka01 commented Aug 8, 2024

I have in the past encountered the same issue, seems like the Prometheus exporter copies the config.json file to the home directory of the user that runs the exporter.
Solution is to delete the config.json in the users home directory before starting the Prometheus exporter after a change to the configuration have been made.

@rqmartins73
Copy link
Author

I have in the past encountered the same issue, seems like the Prometheus exporter copies the config.json file to the home directory of the user that runs the exporter. Solution is to delete the config.json in the users home directory before starting the Prometheus exporter after a change to the configuration have been made.

In my case, it does not copies the config.json to my home directory. And deleting the one in the .jar folder, it asks to create a default one, if I say yes it creates the default config.json in the .jar folder...

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

No branches or pull requests

3 participants