https://github.com/meinside/rpimongo
Raspberry Pi Monitoring with Go
https://github.com/meinside/rpimongo
golang raspberry-pi
Last synced: 6 months ago
JSON representation
Raspberry Pi Monitoring with Go
- Host: GitHub
- URL: https://github.com/meinside/rpimongo
- Owner: meinside
- Created: 2015-08-04T08:28:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-22T07:03:15.000Z (10 months ago)
- Last Synced: 2025-04-29T21:39:27.618Z (9 months ago)
- Topics: golang, raspberry-pi
- Language: JavaScript
- Homepage:
- Size: 1020 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RPiMonGo
A simple web server for monitoring your Raspberry Pi system, built with Go.
It shows `hostname`, `uptime`, `CPU temperature`, `free disk spaces`, `memory split`, and `free memory`.

If you own a public domain name, you can run in on HTTPS with the help of [Let's Encrypt](https://letsencrypt.org/).
## 1. Install
```bash
$ go install github.com/meinside/rpimongo@latest
```
## 2. Configure
Copy the sample config file and edit it:
```bash
$ git clone https://github.com/meinside/rpimongo.git
$ cp rpimongo/config.json.sample /path/to/config.json
$ vi /path/to/config.json
```
Example of **config.json**:
```json
{
"hostname": "my.domain.com",
"serve_ssl": false,
"port_http": 9999,
"verbose": false
}
```
## 3. Run
Run with the path to your config file:
```bash
$ rpimongo /path/to/config.json
```
NOTE: If it is run on port 80 and/or 443, it needs root privilige:
```bash
$ sudo rpimongo /path/to/config.json
```
## 4. Access
Then it can be accessed through: `http://my.domain.com` (and also `https://my.domain.com` if you set "serve_ssl" as true)
## 5. Run it as a service
### For systemd:
```bash
$ sudo vi /etc/systemd/system/rpimongo.service
```
```
[Unit]
Description=RPiMonGo
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/dir/to/config
ExecStart=/somewhere/rpimongo/is/installed/rpimongo config.json
Restart=always
RestartSec=5
Environment=
[Install]
WantedBy=multi-user.target
```
Edit **WorkingDirectory**, and **ExecStart** values to yours.
Make it autostart on every boot:
```bash
$ sudo systemctl enable rpimongo.service
```
and start it manually with:
```bash
$ sudo systemctl start rpimongo.service
```