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

Prometheus.yaml config #9

Closed
MarpleA opened this issue Aug 17, 2020 · 4 comments
Closed

Prometheus.yaml config #9

MarpleA opened this issue Aug 17, 2020 · 4 comments

Comments

@MarpleA
Copy link

MarpleA commented Aug 17, 2020

hi,

I installed the homematic_exporter and run it with
python3 exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411 --debug

It successfully fetches all the data from the ccu but homematic metrics don't show up in prometheus.
here's my prometheus.yaml:

#scrape homematic

  • job_name: 'homematic'
    static_configs:
    • targets: ['localhost:9411']

what am I doing from?

Best

@sfudeus
Copy link
Owner

sfudeus commented Aug 17, 2020

Hmm, looks ok so far. Is your prometheus running on the same host (and not in a container)? Did you try accessing the metrics endpoint from a browser?

@MarpleA
Copy link
Author

MarpleA commented Aug 19, 2020

Thanks for pointing me to the right direction. I realized that none the metric pages of my exporters where actually still accessible (even though they kept on collecting data)
Seems like my prometheus installation was partly broken somehow. After fixing this, the homematic_exporter worked like charm.

there's only one little thing which doesn't work yet - the config file.

if I run:
python3 /home/user01/homematic_exporter/exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411
both devices, weatherstation and power plug are detected.

if I run:
python3 /home/user01/homematic_exporter/exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411 --config_file /home/user01/homematic_exporter/homematic_exporter.json

with config file like this:

{
"supported_device_types": [
"HmIP-SWO-PL",
"HmIP-PSM"

],
"device_mapping": {
"00xxx": "Wetterstation",
"00xxx": "Waschmaschine"
}
}

only "Wetterstation" is being detected - not the power plug "Waschmaschine"

EDIT:
same happens if I use the sample_config.json

@sfudeus
Copy link
Owner

sfudeus commented Aug 19, 2020

You can leave out supported_device_types if you do not want to add additional ones. PSM is supported by default.
The problem most likely is that HMIP-PSM has different case than the others (most have HmIP).
I suggest removing the definition from the config. Even if the mapped names do not match, they just don't get a name mapping, so the mapped_name label is not set.

@MarpleA
Copy link
Author

MarpleA commented Aug 19, 2020

that did the trick. thx

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

2 participants