-
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.
Running h3exporter as systemctl service
- Loading branch information
1 parent
326d73e
commit eedba07
Showing
3 changed files
with
25 additions
and
30 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 |
---|---|---|
@@ -1,31 +1,12 @@ | ||
Python3 script to report WA hadoop3 key stats | ||
|
||
|
||
CURRENTLY, BELOW systemctl SETUP NOT WORK - ISSUE WITH D-BUS AND monitor USER | ||
To set up as a systemctl daemon, as the root user: | ||
* Copy h3exporter service file to systemctl directory | ||
* cp h3exporter.service /usr/lib/systemd/system/ | ||
|
||
To set up as a systemctl daemon: | ||
* Ensure user systemd directory exists | ||
* mkdir -p ~/.config/systemd/user | ||
|
||
* Create service file as ~/.config/systemd/user/h3exporter.service, chmod 644 | ||
|
||
``` | ||
[Unit] | ||
Description=h3exporter systemctl configuration | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/home/monitor/github/ukwa-monitor/h3exporter/run_h3exporter.sh | ||
Restart=always | ||
RestartSec=30 | ||
|
||
[Install] | ||
WantedBy=default.target | ||
``` | ||
|
||
* Reload user systemctl | ||
* systemctl --user daemon-reload | ||
* Reload systemctl | ||
* systemctl daemon-reload | ||
|
||
* Enable and start h3exporter service | ||
* systemctl --user enable --now h3exporter | ||
* systemctl enable --now h3exporter |
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,14 @@ | ||
[Unit] | ||
Description=h3exporter systemctl configuration | ||
After=network.target | ||
|
||
[Service] | ||
Type=forking | ||
User=monitor | ||
Group=monitor | ||
ExecStart=/home/monitor/github/ukwa-monitor/h3exporter/run_h3exporter.sh | ||
Restart=always | ||
RestartSec=30 | ||
|
||
[Install] | ||
WantedBy=default.target |