-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Hardware Monitoring to NUC installations (#1745)
* Add hardware monitoring to NUC installations * Update Python dependencies for maintenance and installer image
- Loading branch information
Showing
9 changed files
with
85 additions
and
17 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
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,5 @@ | ||
--- | ||
# Default values for monitor_hardware role | ||
|
||
# How long to keep log files (in days). | ||
history_days: 60 |
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,13 @@ | ||
--- | ||
######################### | ||
# Handlers for setting | ||
# up hardware monitoring | ||
######################### | ||
|
||
- name: restart target | ||
reboot: | ||
|
||
- name: restart sysstat service | ||
service: | ||
name: sysstat | ||
state: restarted |
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,34 @@ | ||
--- | ||
################################## | ||
# Setup sysstat to monitor target | ||
# hardware. | ||
################################## | ||
|
||
- name: Install sensor package | ||
apt: | ||
name: | ||
- lm-sensors | ||
- sysstat | ||
notify: restart target | ||
|
||
- name: Enable monitoring | ||
lineinfile: | ||
path: /etc/sysstat/sysstat | ||
regexp: "^#*SADC_OPTIONS=" | ||
state: present | ||
line: SADC_OPTIONS="-D -S DISK,POWER" | ||
notify: restart sysstat service | ||
|
||
- name: Set history | ||
lineinfile: | ||
path: /etc/sysstat/sysstat | ||
regexp: "^#*HISTORY=" | ||
state: present | ||
line: HISTORY={{ history_days }} | ||
notify: restart sysstat service | ||
|
||
- name: Start monitoring service | ||
service: | ||
name: sysstat | ||
enabled: yes | ||
state: started |
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
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