Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vernak2539 committed Sep 23, 2022
1 parent d17fe45 commit 950173e
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions README.md
@@ -0,0 +1,58 @@
# DHT Sensor Exporter

Export temperature and humidity readings to [Prometheus](https://prometheus.io/).

## Usage

Check the latest release on the [release](https://github.com/vernak2539/dht_sensor_exporter/releases) page to get the link
for the architecture you're wanting (limited selection now).

```bash
mkdir -p /opt/dht_sensor_exporter

cd /opt/dht_sensor_exporter

sudo wget https://github.com/vernak2539/dht_sensor_exporter/releases/download/v0.15.0/dht_sensor_exporter-v0.15.0-linux-armv7

sudo mv dht_sensor_exporter-v0.15.0-linux-armv7 dht_sensor_exporter

sudo chmod +x ./dht_sensor_exporter
```

I would suggest setting up a systemd service and running it under it's own user

**Create User**

```sh
sudo useradd -M dht_sensor_exporter
sudo chown -R dht_sensor_exporter:root /opt/dht_sensor_exporter
```

**Setup systemd**

```sh
sudo vi /etc/systemd/system/dht_sensor_exporter.service
```

Insert following information into service file:

```
[Unit]
Description=DHT Sensor Exporter
After=network.target
[Service]
User=dht_sensor_exporter
Type=simple
ExecStart=/opt/dht_sensor_exporter/dht_sensor_exporter
[Install]
WantedBy=multi-user.target
```

Run following commands:

```sh
sudo systemctl daemon-reload
sudo systemctl start dht_sensor_exporter
```

0 comments on commit 950173e

Please sign in to comment.