-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #900 from home-assistant/prometheus
- Loading branch information
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
# This file is used to generate the prometheus/addons endpoint | ||
permalink: '/prometheus/addons' | ||
eleventyAllowMissingExtension: true | ||
--- | ||
# | ||
# Example usage: | ||
# - job_name: "homeassistant_analytics_addons" | ||
# scrape_interval: 1h | ||
# metrics_path: /prometheus/addons | ||
# scheme: https | ||
# static_configs: | ||
# - targets: ["analytics.home-assistant.io"] | ||
# | ||
|
||
{%- for addon in addons %} | ||
addon_total{slug="{{addon[0]}}"} {{addon[1]["total"]}} | ||
addon_auto_update{slug="{{addon[0]}}"} {{addon[1]["auto_update"]}} | ||
addon_protected{slug="{{addon[0]}}"} {{addon[1]["protected"]}} | ||
{%- for version in addon[1]["versions"] %} | ||
addon_version{slug="{{addon[0]}}",version="{{version[0]}}"} {{version[1]}} | ||
{%- endfor %} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
# This file is used to generate the prometheus/base endpoint | ||
permalink: '/prometheus/base' | ||
eleventyAllowMissingExtension: true | ||
--- | ||
# | ||
# Example usage: | ||
# - job_name: "homeassistant_analytics_base" | ||
# scrape_interval: 1h | ||
# metrics_path: /prometheus/base | ||
# scheme: https | ||
# static_configs: | ||
# - targets: ["analytics.home-assistant.io"] | ||
# | ||
instances {{ data.history.last.active_installations }} | ||
{%- for installation_types in data.current.installation_types %} | ||
installation_type{type="{{ installation_types[0] }}"} {{ installation_types[1] }} | ||
{%- endfor %} | ||
|
||
reports_addons {{ data.current.reports_addons }} | ||
reports_integrations {{ data.current.reports_integrations }} | ||
reports_statistics {{ data.current.reports_statistics }} | ||
|
||
median_addons_count {{ data.current.avg_addons }} | ||
median_automations_count {{ data.current.avg_automations }} | ||
median_integrations_count {{ data.current.avg_integrations }} | ||
median_states_count {{ data.current.avg_states }} | ||
median_users_count {{ data.current.avg_users }} | ||
|
||
{% for country in data.current.countries %} | ||
country{code="{{ country[0] }}"} {{ country[1] }} | ||
{%- endfor %} | ||
|
||
{% for version in data.current.versions %} | ||
version{version="{{ version[0] }}"} {{ version[1] }} | ||
{%- endfor %} | ||
|
||
supervisor_unhealthy {{ data.current.supervisor["unhealthy"] }} | ||
supervisor_unsupported {{ data.current.supervisor["unsupported"] }} | ||
{% for arch in data.current.supervisor["arch"] %} | ||
supervisor_arch{arch="{{ arch[0] }}"} {{ arch[1] }} | ||
{%- endfor %} | ||
|
||
{% for board in data.current.operating_system["boards"] %} | ||
operating_system_board{board="{{ board[0] }}"} {{ board[1] }} | ||
{%- endfor %} | ||
{% for version in data.current.operating_system["versions"] %} | ||
operating_system_version{version="{{ version[0] }}"} {{ version[1] }} | ||
{%- endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# This file is used to generate the prometheus/custom_integrations endpoint | ||
permalink: '/prometheus/custom_integrations' | ||
eleventyAllowMissingExtension: true | ||
--- | ||
# | ||
# Example usage: | ||
# - job_name: "homeassistant_analytics_custom_integrations" | ||
# scrape_interval: 1h | ||
# metrics_path: /prometheus/custom_integrations | ||
# scheme: https | ||
# static_configs: | ||
# - targets: ["analytics.home-assistant.io"] | ||
# | ||
|
||
{%- for integration in custom_integrations %} | ||
custom_integration{domain="{{ integration[0] }}"} {{ integration[1]["total"] }} | ||
{%- for version in integration[1]["versions"] %} | ||
custom_integration_version{domain="{{ integration[0] }}",version="{{version[0]}}"} {{ version[1] }} | ||
{%- endfor -%} | ||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# This file is used to generate the prometheus/integrations endpoint | ||
permalink: '/prometheus/integrations' | ||
eleventyAllowMissingExtension: true | ||
--- | ||
# | ||
# Example usage: | ||
# - job_name: "homeassistant_analytics_integrations" | ||
# scrape_interval: 1h | ||
# metrics_path: /prometheus/integrations | ||
# scheme: https | ||
# static_configs: | ||
# - targets: ["analytics.home-assistant.io"] | ||
# | ||
|
||
{%- for integration in data.current.integrations %} | ||
integration{domain="{{ integration[0] }}"} {{ integration[1] }} | ||
{%- endfor -%} |