hassio-addons / addon-prometheus

Prometheus - Home Assistant Community Add-ons
https://addons.community
MIT License
20 stars 31 forks source link

Feature Request - Ability to change default flags #9

Closed lenisko closed 2 years ago

lenisko commented 3 years ago

Problem/Motivation

Lack of ability to set own retention time.

Expected behavior

A way to change prometheus deafults.

Proposed changes

Load flags from either HASS WebUI or file under /share/prometheus and overwrite defaults.

vandalon commented 3 years ago

Can we expect an update for this? :)

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

lenisko commented 3 years ago

Not solved so far Mr. Bot

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

nervous-inhuman commented 2 years ago

I'm also looking for this feature, as I want to be able to set a longer retention. Bump.

@frenck

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

nervous-inhuman commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

No.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

nervous-inhuman commented 2 years ago

.

lenisko commented 2 years ago

As extension is no longer maintained and I had trouble finishing PR, I ended up with workaround. I'm running HASS inside KVM so I have started prometheus on host/docker. Here's my docker-compose.yaml and prometheus.yml.

version: '3.2'

services:
  prometheus:
    image: prom/prometheus:latest
    user: "1000:1000"
    container_name: prometheus
    ports:
    - 9091:9090
    volumes:
      - ./prometheus/:/etc/prometheus/
      - ./prometheus_data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--storage.tsdb.retention.size=128GB'
      - '--web.console.libraries=/usr/share/prometheus/console_libraries'
      - '--web.console.templates=/usr/share/prometheus/consoles'
    restart: always
global:
  scrape_interval:     30s
  evaluation_interval: 30s

scrape_configs:
  - job_name: 'prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']

  - job_name: "hass"
    scrape_interval: 60s
    metrics_path: /api/prometheus

    authorization:
      credentials: "<hass_token>"

    scheme: http
    static_configs:
      - targets: ['<hass_ip>:<hass_port>']
github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!