Created
July 2, 2025 12:51
-
-
Save marshallmassengill/5af1fd2ac80905c7462c44fd0b363713 to your computer and use it in GitHub Desktop.
Enphase Solar Collector Config Files for OpenNMS
This file contains hidden or 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
| <!-- Snippet for the collector configuration --> | |
| <service name="Prometheus-Enphase-Collector" interval="300000" user-defined="false" status="on"> | |
| <parameter key="collection" value="enphase_collector"/> | |
| <parameter key="thresholding-enabled" value="true"/> | |
| <parameter key="url" value="http://${interface:address}:8080/solar/actuator/prometheus"/> | |
| </service> | |
| <!-- Add the collector at the end --> | |
| <collector service="Prometheus-Enphase-Collector" class-name="org.opennms.netmgt.collectd.prometheus.PrometheusCollector"/> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <prometheus-datacollection-config> | |
| <collection name="enphase_collector"> | |
| <rrd step="300"> | |
| <rra>RRA:AVERAGE:0.5:1:2016</rra> | |
| <rra>RRA:AVERAGE:0.5:12:1488</rra> | |
| <rra>RRA:AVERAGE:0.5:288:366</rra> | |
| <rra>RRA:MAX:0.5:288:366</rra> | |
| <rra>RRA:MIN:0.5:288:366</rra> | |
| </rrd> | |
| <group-ref>enphase_collector_panels</group-ref> | |
| <group-ref>enphase_collector_solar_meter</group-ref> | |
| <group-ref>enphase_collector_collection_time</group-ref> | |
| <group-ref>enphase_collector_collection_period</group-ref> | |
| </collection> | |
| <!-- | |
| # HELP solar_panel_production_watts Solar Panel Production | |
| # TYPE solar_panel_production_watts gauge | |
| solar_panel_production_watts{panel_id="solar.panel-202311036064",} 270.0 | |
| solar_panel_production_watts{panel_id="solar.panel-482241010307",} 159.0 | |
| solar_panel_production_watts{panel_id="solar.panel-202311052093",} 258.0 | |
| --> | |
| <group name="enphase_collector_panels" | |
| resource-type="enphaseSolarPanel" | |
| filter-exp="name matches 'solar_panel_production_watts.*'" | |
| group-by-exp="labels[panel_id]"> | |
| <numeric-attribute alias-exp="name.substring('solar_panel_'.length())" compress-alias="false" type="Gauge"/> | |
| <string-attribute alias="panel_id" value-exp="labels[panel_id]"/> | |
| </group> | |
| <!-- | |
| # HELP solar_meter_voltage_volts Production Voltage as at the collection time | |
| # TYPE solar_meter_voltage_volts gauge | |
| solar_meter_voltage_volts 123.13899993896484 | |
| # HELP solar_meter_export_watts Energy exported to the grid as at the collection time | |
| # TYPE solar_meter_export_watts gauge | |
| solar_meter_export_watts 0.0 | |
| # HELP solar_meter_consumption_watts Household consumption as at the collection time | |
| # TYPE solar_meter_consumption_watts gauge | |
| solar_meter_consumption_watts 4989.2861328125 | |
| # HELP solar_meter_import_watts Energy imported from the grid as at the collection time | |
| # TYPE solar_meter_import_watts gauge | |
| solar_meter_import_watts 0.0 | |
| # HELP solar_meter_production_watts Solar production as at the collection time | |
| # TYPE solar_meter_production_watts gauge | |
| solar_meter_production_watts 4989.2861328125 | |
| --> | |
| <group name="enphase_collector_solar_meter" | |
| resource-type="enphaseSolarMeter" | |
| filter-exp="name matches 'solar_meter.*'" | |
| group-by-exp="name.substring('solar_meter_'.length())"> | |
| <numeric-attribute alias-exp="name.substring('solar_meter_'.length())" compress-alias="false" type="Gauge"/> | |
| <string-attribute alias="meter_name" value-exp="name.substring('solar_meter_'.length())"/> | |
| </group> | |
| <!-- | |
| # HELP solar_collection_time_seconds Collection time | |
| # TYPE solar_collection_time_seconds gauge | |
| solar_collection_time_seconds{TZ="Europe/London",} 1.745336693E9 | |
| --> | |
| <group name="enphase_collector_collection_time" | |
| resource-type="enphaseSolarCollectionTime" | |
| filter-exp="name matches 'solar_collection_time.*'" | |
| group-by-exp="name.substring('solar_collection_time_'.length())"> | |
| <numeric-attribute alias-exp="name.substring('solar_collection_time_'.length())" compress-alias="false" type="Gauge"/> | |
| </group> | |
| <!-- | |
| # HELP solar_collection_period_ms Time in ms between collection events | |
| # TYPE solar_collection_period_ms gauge | |
| solar_collection_period_ms 60000.0 | |
| --> | |
| <group name="enphase_collector_collection_period" | |
| resource-type="enphaseSolarCollectionPeriod" | |
| filter-exp="name matches 'solar_collection_period.*'" | |
| group-by-exp="name.substring('solar_collection_period_'.length())"> | |
| <numeric-attribute alias-exp="name.substring('solar_collection_period_'.length())" compress-alias="false" type="Gauge"/> | |
| </group> | |
| </prometheus-datacollection-config> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <resource-types> | |
| <resourceType name="enphaseSolarPanel" label="Solar Panels" resourceLabel="Panel (${panel_id})"> | |
| <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/> | |
| <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/> | |
| <parameter key="replace-all" value="s/[\.|-]/_/" /> | |
| </resourceType> | |
| <resourceType name="enphaseSolarMeter" label="Solar Meters" resourceLabel="${meter_name} Meter"> | |
| <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/> | |
| <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/> | |
| <parameter key="replace-all" value="s/[\.|-]/_/" /> | |
| </resourceType> | |
| <resourceType name="enphaseSolarCollectionTime" label="Solar Collection Time" resourceLabel="Collection Time"> | |
| <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/> | |
| <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/> | |
| <parameter key="replace-all" value="s/[\.|-]/_/" /> | |
| </resourceType> | |
| <resourceType name="enphaseSolarCollectionPeriod" label="Solar Collection Period" resourceLabel="Collection Period"> | |
| <persistenceSelectorStrategy class="org.opennms.netmgt.collection.support.PersistAllSelectorStrategy"/> | |
| <storageStrategy class="org.opennms.netmgt.collection.support.IndexStorageStrategy"/> | |
| <parameter key="replace-all" value="s/[\.|-]/_/" /> | |
| </resourceType> | |
| </resource-types> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment