-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create debian packages to simplifies installation.
closes #53
- Loading branch information
Showing
7 changed files
with
115 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
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,17 @@ | ||
# Dummy configuration for a single metric | ||
Connection: | ||
Type: "Tunnel" | ||
Endpoint: "192.168.1.15:3671" | ||
PhysicalAddress: 2.0.1 | ||
MetricsPrefix: knx_ | ||
AddressConfigs: | ||
0/0/1: | ||
Name: dummy_metric | ||
DPT: 1.* | ||
Export: true | ||
MetricType: "counter" | ||
ReadActive: true | ||
MaxAge: 10m | ||
Comment: dummy comment | ||
Labels: | ||
room: office |
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 @@ | ||
# Remove this file to allow auto starts of the knx-exporter daemon through systemd. |
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 @@ | ||
# | ||
# Copyright © 2022-2023 Christian Fritz <mail@chr-fritz.de> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
systemctl daemon-reload || true | ||
systemctl enable knx-exporter.service || true |
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,19 @@ | ||
# | ||
# Copyright © 2022-2023 Christian Fritz <mail@chr-fritz.de> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
systemctl disable knx-exporter.service || true | ||
systemctl stop knx-exporter.service || true | ||
systemctl daemon-reload || true |
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,4 @@ | ||
LOG_LEVEL=info | ||
CONFIG_PATH=/etc/knx-exporter/ga-config.yaml | ||
PORT=8080 | ||
RESTART_POLICY=exit |
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,20 @@ | ||
[Unit] | ||
Description=KNX Prometheus exporter | ||
After=network.target | ||
ConditionPathExists=!/etc/knx-exporter/knx-exporter_not_to_be_run | ||
[Service] | ||
EnvironmentFile=-/etc/default/knx-exporter | ||
User=root | ||
Type=simple | ||
Restart=on-failure | ||
RestartSec=10 | ||
ExecStart=/usr/bin/knx-exporter run --log_level $LOG_LEVEL -f $CONFIG_PATH -r $RESTART_POLICY -p $PORT | ||
KillMode=process | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
Alias=knx-exporter.service | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
Alias=knx-exporter.service |