This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[APP] Prometheus.io export

2»

Comments

  • JBS said:
    bvdbos said:
    Which Homey version are you on?
    1.5.3 but >= 1.5.6 is needed I saw :(
    Yes, I figured I’d go with the latest stable since that was the only thing I could test on. Any particular reason to hold back on the update to 1.5.6?
  • Just a heads up everyone that the 1.1.3 version of the app is going to change the names of metrics to only include the state names and instead use labels for device and zone names.
    I am sorry if this causes problems for those of you who already installed the app, but I really believe it’s a change for the better, and it was really how Prometheus intended for it to be (it will be apparent once you start creating more advanced dashboards...). Hopefully from this on, metrics will only be added, not renamed/regrouped.
  • Kyrcio said:
    JBS said:
    bvdbos said:
    Which Homey version are you on?
    1.5.3 but >= 1.5.6 is needed I saw :(
    Yes, I figured I’d go with the latest stable since that was the only thing I could test on. Any particular reason to hold back on the update to 1.5.6?
    It seems to run fine on 1.5.3.
    @JBS just edit app.json and change 1.5.6 to 1.5.3.

    I am also still on 1.5.3 (stable) - waiting for update 1.5.8 to land on my Homey.
  • SietseVisserSietseVisser Member
    edited March 2018
    Looking at the output to prometheus, should meter_power not be of type counter instead of gauge because it is an (almost-)ever-increasing number?
    I am very new to Prometheus, maybe the comment in the output is just what it is - comment and not a hint to Prometheus.
  • Kyrcio said:
    Changing the port the app listens on in the code doesn't make a difference, I am unable to access the metrics page. Something really seems off.... @Kyrcio  any idea what could be causing this issue? Perhaps you can add some kind of logging the app so we can figure out what's going on. :smile:
    I have really no idea about your particular case, but I would “nmap” the Homey just to see what’a open. Running the app with “athom app run” should give you plenty of log output. If you didn’t get any I suspect there was a problem starting the app.
    Well I did a factory reset to my Homey so I can't have a look at it anymore, since the app seems to be running stable since last Saturday morning :-). If I may encounter issues with this app again I'll have a look at the athom app run and see if it produces any logging. Thanks for the heads up.
  • Kyrcio said:
    Just a heads up everyone that the 1.1.3 version of the app is going to change the names of metrics to only include the state names and instead use labels for device and zone names.
    I am sorry if this causes problems for those of you who already installed the app, but I really believe it’s a change for the better, and it was really how Prometheus intended for it to be (it will be apparent once you start creating more advanced dashboards...). Hopefully from this on, metrics will only be added, not renamed/regrouped.
    Appreciate this change
  • edited March 2018
    Kyrcio said:
    Just a heads up everyone that the 1.1.3 version of the app is going to change the names of metrics to only include the state names and instead use labels for device and zone names.
    I am sorry if this causes problems for those of you who already installed the app, but I really believe it’s a change for the better, and it was really how Prometheus intended for it to be (it will be apparent once you start creating more advanced dashboards...). Hopefully from this on, metrics will only be added, not renamed/regrouped.
    I've updated the app and I think it's a good change. 

    Now I can add all sensor of one kind easy in Grafana using for example:

    "homey_device_measure_temperature" 

    But the labels show up like this: 


    homey_device_measure_temperature{device="76cc5afe-f454-4927-808f-",instance="192.168.6.50:9414",job="Homey",name="SmokeSensor - Kitchen",zone="Kitchen",zones="Home/Ground floor/Kitchen"}

    homey_device_measure_temperature{device="7f066f03-e5fa-4f8e-8f24-",instance="192.168.6.50:9414",job="Homey",name="Flood Sensor",zone="Basement",zones="Home/Basement"}

    homey_device_measure_temperature{device="b57005b4-286e-421a-a730-",instance="192.168.6.50:9414",job="Homey",name="Motion - Utilityroom",zone="utility Room",zones="Home/Ground floor/utility Room"}

    homey_device_measure_temperature{device="c23c5eb0-5319-4dd9-ae43-",instance="192.168.6.50:9414",job="Homey",name="Motion - Toilet",zone="Toilet",zones="Home/Ground floor/Toilet"}

    Is there an easy way to use the Zone name as labels when I add my temperature sensors in Grafana this way?

  • You could try using {{zone}} or {{name}} as label format in Grafana.
  • KyrcioKyrcio Member
    edited March 2018
    Version 0.1.3 is now published to the beta channel.
  • Kyrcio said:
    You could try using {{zone}} or {{name}} as label format in Grafana.
    That did the trick, thanks a lot! :smile: I like the opportunities this app provides, keep up the good work!
  • KyrcioKyrcio Member
    edited March 2018
    Looking at the output to prometheus, should meter_power not be of type counter instead of gauge because it is an (almost-)ever-increasing number?
    I am very new to Prometheus, maybe the comment in the output is just what it is - comment and not a hint to Prometheus.
    Counters are for ever increasing numbers. The power metering comes from the device and I cannot guarantee that it is ever increasing (it may wrap around or be reset). I actually did not try using counters, I just assumed there would be a problem if this ever happened based on the documentation. Also, I did not see any downside of using a gauge.
  • KyrcioKyrcio Member
    edited March 2018
    A number of new metrics have been added to github.
    • Z-wave radio stats per device
    • Storage per app (thanks Klippo)
  • JBSJBS Member
    Added some new devices to Homey a few days ago but they don't show up in the metrics. Anything needed to force new devices into the  metrics?
  • JBS said:
    Added some new devices to Homey a few days ago but they don't show up in the metrics. Anything needed to force new devices into the  metrics?
    Hmm. They should appear instantly on the next scrape (I just added a Dimmer2 today so I know :) ). Can you browse to <Homey Ip>:9414/metrics and see if they appear there?
  • JBSJBS Member
    edited March 2018
    Kyrcio said:
    JBS said:
    Added some new devices to Homey a few days ago but they don't show up in the metrics. Anything needed to force new devices into the  metrics?
    Hmm. They should appear instantly on the next scrape (I just added a Dimmer2 today so I know :) ). Can you browse to <Homey Ip>:9414/metrics and see if they appear there?
    No, the new devices are not visible on the metrics page..

    \\After restarting the Prometheus app, the devices are available.
  • matrovermatrover Member
    edited April 2018
    Hi Guys, 

    Dont know if this is supported but i was googling around for Prometheus, and there seems to be an free hosted version of Grafana with an Prometheus plugin. so i installed the Prometheus.io app on Homey, forwarded the ports 9414 (with or without accesslists) tested the Http://xxxxx.xxxx.net:9414/metrics (worked) 
    and tried to setup the datasource in Hosted Grafana:
     


    But the error message isnt that clear <span>:wink:</span>

    tried with or without "/metrics"

    any idea? or just not supported? 


    Homey version: 1.5.9

    App version: v0.1.3


    Greetings,

    Marijn

  • matrover said:
    Hi Guys, 

    Dont know if this is supported but i was googling around for Prometheus, and there seems to be an free hosted version of Grafana with an Prometheus plugin. so i installed the Prometheus.io app on Homey, forwarded the ports 9414 (with or without accesslists) tested the Http://xxxxx.xxxx.net:9414/metrics (worked) 
    and tried to setup the datasource in Hosted Grafana:
     


    But the error message isnt that clear <span>:wink:</span>

    tried with or without "/metrics"

    any idea? or just not supported? 


    Homey version: 1.5.9

    App version: v0.1.3


    Greetings,

    Marijn


    ok, i troubleshooted some more, the grafana suite on a local windows machine doesnt work: 


    i treid the Prometheus.io app on an local and via internet and the both worked: 




    anyone got an idea why the Grafana isnt working (online, offline or hosted)? 
  • matrover said:
    matrover said:
    Hi Guys, 

    Dont know if this is supported but i was googling around for Prometheus, and there seems to be an free hosted version of Grafana with an Prometheus plugin. so i installed the Prometheus.io app on Homey, forwarded the ports 9414 (with or without accesslists) tested the Http://xxxxx.xxxx.net:9414/metrics (worked) 
    and tried to setup the datasource in Hosted Grafana:
     


    But the error message isnt that clear <span>:wink:</span>

    tried with or without "/metrics"

    any idea? or just not supported? 


    Homey version: 1.5.9

    App version: v0.1.3


    Greetings,

    Marijn


    ok, i troubleshooted some more, the grafana suite on a local windows machine doesnt work: 


    i treid the Prometheus.io app on an local and via internet and the both worked: 




    anyone got an idea why the Grafana isnt working (online, offline or hosted)? 
    Because its Homey -> Prometheus (with the Prometheus app) -> Grafana
  • matrover said:
    matrover said:
    Hi Guys, 

    Dont know if this is supported but i was googling around for Prometheus, and there seems to be an free hosted version of Grafana with an Prometheus plugin. so i installed the Prometheus.io app on Homey, forwarded the ports 9414 (with or without accesslists) tested the Http://xxxxx.xxxx.net:9414/metrics (worked) 
    and tried to setup the datasource in Hosted Grafana:
     


    But the error message isnt that clear <span>:wink:</span>

    tried with or without "/metrics"

    any idea? or just not supported? 


    Homey version: 1.5.9

    App version: v0.1.3


    Greetings,

    Marijn


    ok, i troubleshooted some more, the grafana suite on a local windows machine doesnt work: 


    i treid the Prometheus.io app on an local and via internet and the both worked: 




    anyone got an idea why the Grafana isnt working (online, offline or hosted)? 
    Because its Homey -> Prometheus (with the Prometheus app) -> Grafana
    Ah, Thanks, that worked 
  • KyrcioKyrcio Member
    The new version is now published. It has been ready for some time, but I totally missed that I had to manually publish it after it has been approved.

    The most siignificant changes are:
    * Adds some new metrics (z-wave radio stats, storage)
    * Fixes a crash bug caused by metrics with invalid characters
  • App is working for me with latest appstore beta version. Did a CLI on the latest beta GH version but that did not show the /9414/metrics page. The appstore version does, cheers!
  • JBS said:
    No, the new devices are not visible on the metrics page..

    \\After restarting the Prometheus app, the devices are available.
    Same thingie here. New devices or re-named devices only show up after restarting the app or Homey. Also my swap count and memory numbers stay the same until restart. Device updates are normal, also the poweruse numbers are updatet instantly.  Is there anything i can do about that besides restarting the app every 15 seconds?
  • AardAard Member
    Can anyone tell me this crawls energy usage from smart meters as well? I need a place to get decent reports on energy usage (historical). I need totals per month per meter to be specific.

    I have no meters placed yet, so I can't check in http://homeyip:9414/metrics
  • Been playing around, nice stuff:


    also shared this dashboard ID: 6311

    @Kyrcio
     Feature request: 
    (Smart) presence metrics
    Better logic metrics

    Thanks!
  • SjalabertSjalabert Member
    edited June 2018
    matrover said:
    Been playing around, nice stuff:


    also shared this dashboard ID: 6311

    @Kyrcio
     Feature request: 
    (Smart) presence metrics
    Better logic metrics

    Thanks!

    I'm tying to get some graphics. But get only Request errors. Where did I have to change the device name? Thanks for the response. See my settings below:

    (get metrics data:)






    Thx for the support!!
  • Sjalabert said:
    matrover said:
    Been playing around, nice stuff:


    also shared this dashboard ID: 6311

    @Kyrcio
     Feature request: 
    (Smart) presence metrics
    Better logic metrics

    Thanks!

    I'm tying to get some graphics. But get only Request errors. Where did I have to change the device name? Thanks for the response. See my settings below:

    (get metrics data:)






    Thx for the support!!

    Hi your making the same mistake as i did, the Homey Prometheus app cant (directly) be queried by Grafana. 

    you'll need it like this: Homey Prometheus app > Prometheus instance > (like me, your missing the prometheus instance)
    its like this: metrics Source (homey prometheus app > metrics collector (prometheus) > Dashboarding (grafana)

    an Prometheus instance is very easy to setup using containers in azure, or for instance Docker on a windows machine.  or on any other linux device. 

    the guys at grafana are looking to setup hosted metrics for small instances (called the starter plan), but it isnt live yet. i suggest (like i did), that you make your own Prometheus instance for now and also apply for the hosted metrics (so maybe Grafana will speed it up) https://grafana.com/cloud/metrics
  • @matrover Thanks a lot (dankjewel ;)) I think that I buy an RPi and install the instance Prometheus and Grafana on it ;) 
Sign In or Register to comment.