move lm-sensors to its own bundle, add to hardware systems

This commit is contained in:
Franzi 2021-06-05 12:23:09 +02:00
parent 5dde5d1642
commit 91cf6cd1e5
Signed by: kunsi
GPG key ID: 12E3D2136B818350
10 changed files with 27 additions and 13 deletions

View file

@ -3,7 +3,7 @@ def dashboard_row_sensors(panel_id, node):
'title': 'sensors', 'title': 'sensors',
'collapse': False, 'collapse': False,
'editable': False, 'editable': False,
'height': '200px', 'height': '250px',
'panels': [ 'panels': [
{ {
'aliasColors': {}, 'aliasColors': {},
@ -13,11 +13,11 @@ def dashboard_row_sensors(panel_id, node):
'datasource': None, 'datasource': None,
'fieldConfig': { 'fieldConfig': {
'defaults': { 'defaults': {
'displayName': '${__field.labels.feature}' 'displayName': '${__field.labels.chip} ${__field.labels.feature}'
}, },
'overrides': [] 'overrides': []
}, },
'fill': 1, 'fill': 0,
'fillGradient': 0, 'fillGradient': 0,
'hiddenSeries': False, 'hiddenSeries': False,
'id': next(panel_id), 'id': next(panel_id),
@ -33,7 +33,7 @@ def dashboard_row_sensors(panel_id, node):
'values': False 'values': False
}, },
'lines': True, 'lines': True,
'linewidth': 1, 'linewidth': 2,
'NonePointMode': 'None', 'NonePointMode': 'None',
'options': { 'options': {
'alertThreshold': True 'alertThreshold': True
@ -60,7 +60,6 @@ def dashboard_row_sensors(panel_id, node):
|> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => |> filter(fn: (r) =>
r["_measurement"] == "sensors" and r["_measurement"] == "sensors" and
r["chip"] == "coretemp-isa-0000" and
r["_field"] == "temp_input" and r["_field"] == "temp_input" and
r["host"] == "{node.name}" r["host"] == "{node.name}"
) )
@ -76,7 +75,7 @@ def dashboard_row_sensors(panel_id, node):
], ],
'thresholds': [], 'thresholds': [],
'timeRegions': [], 'timeRegions': [],
'title': 'CPU Temperature', 'title': 'temperatures',
'tooltip': { 'tooltip': {
'shared': True, 'shared': True,
'sort': 0, 'sort': 0,
@ -121,11 +120,11 @@ def dashboard_row_sensors(panel_id, node):
'datasource': None, 'datasource': None,
'fieldConfig': { 'fieldConfig': {
'defaults': { 'defaults': {
'displayName': '${__field.labels.feature}' 'displayName': '${__field.labels.chip} ${__field.labels.feature}'
}, },
'overrides': [] 'overrides': []
}, },
'fill': 1, 'fill': 0,
'fillGradient': 0, 'fillGradient': 0,
'hiddenSeries': False, 'hiddenSeries': False,
'id': next(panel_id), 'id': next(panel_id),
@ -141,7 +140,7 @@ def dashboard_row_sensors(panel_id, node):
'values': False 'values': False
}, },
'lines': True, 'lines': True,
'linewidth': 1, 'linewidth': 2,
'NonePointMode': 'None', 'NonePointMode': 'None',
'options': { 'options': {
'alertThreshold': True 'alertThreshold': True
@ -183,7 +182,7 @@ def dashboard_row_sensors(panel_id, node):
], ],
'thresholds': [], 'thresholds': [],
'timeRegions': [], 'timeRegions': [],
'title': 'Fan speed', 'title': 'fans',
'tooltip': { 'tooltip': {
'shared': True, 'shared': True,
'sort': 0, 'sort': 0,

View file

@ -101,9 +101,9 @@ for rnode in repo.nodes:
], ],
} }
if rnode.has_bundle('pacman'): if rnode.has_bundle('lm-sensors'):
dashboard['rows'].append(dashboard_row_sensors(panel_id, rnode)) dashboard['rows'].append(dashboard_row_sensors(panel_id, rnode))
dashboard['tags'].add('lm_sensors') dashboard['tags'].add('lm-sensors')
dashboard['rows'].append(dashboard_row_disk_space(panel_id, rnode)) dashboard['rows'].append(dashboard_row_disk_space(panel_id, rnode))
dashboard['rows'].append(dashboard_row_disk_iops(panel_id, rnode)) dashboard['rows'].append(dashboard_row_disk_iops(panel_id, rnode))

View file

@ -1,4 +1,14 @@
defaults = { defaults = {
'apt': {
'packages': {
'lm-sensors': {},
},
},
'pacman': {
'packages': {
'lm_sensors': {},
},
},
'telegraf': { 'telegraf': {
'input_plugins': { 'input_plugins': {
'builtin': { 'builtin': {

View file

@ -77,7 +77,6 @@ if node.metadata.get('pacman/install_gui', False):
'rfkill': {}, 'rfkill': {},
'wpa_supplicant': {}, 'wpa_supplicant': {},
'wpa_actiond': {}, 'wpa_actiond': {},
'lm_sensors': {},
} }
for pkg, config in node.metadata.get('pacman/packages', {}).items(): for pkg, config in node.metadata.get('pacman/packages', {}).items():

View file

@ -1,6 +1,7 @@
nodes['home.kodi-wohnzimmer'] = { nodes['home.kodi-wohnzimmer'] = {
'hostname': '172.19.138.24', 'hostname': '172.19.138.24',
'bundles': { 'bundles': {
'lm-sensors',
'kodi', 'kodi',
'nfs-client', 'nfs-client',
'smartd', 'smartd',

View file

@ -4,6 +4,7 @@ nodes['home.nas'] = {
'hostname': '172.19.138.20', 'hostname': '172.19.138.20',
'bundles': { 'bundles': {
'backup-server', 'backup-server',
'lm-sensors',
'mosquitto', 'mosquitto',
'netdata', 'netdata',
'nfs-server', 'nfs-server',

View file

@ -4,6 +4,7 @@ nodes['htz.ex42-1048908'] = {
'element-web', 'element-web',
'gitea', 'gitea',
'jenkins-ci', 'jenkins-ci',
'lm-sensors',
'matrix-media-repo', 'matrix-media-repo',
'matrix-synapse', 'matrix-synapse',
'mautrix-telegram', 'mautrix-telegram',

View file

@ -5,6 +5,7 @@ nodes['kunsi-seibert-x1'] = {
'bundles': { 'bundles': {
'basic', 'basic',
'lldp', 'lldp',
'lm-sensors',
'nfs-client', 'nfs-client',
'pacman', 'pacman',
'openssh', 'openssh',

View file

@ -4,6 +4,7 @@ nodes['kunsi-t470'] = {
'hostname': 'localhost', 'hostname': 'localhost',
'bundles': { 'bundles': {
'lldp', 'lldp',
'lm-sensors',
'nfs-client', 'nfs-client',
}, },
'groups': { 'groups': {

View file

@ -10,6 +10,7 @@ nodes['rx300'] = {
'hostname': '172.19.138.26', 'hostname': '172.19.138.26',
'bundles': { 'bundles': {
'lldp', # TODO remove once this is no longer at home 'lldp', # TODO remove once this is no longer at home
'lm-sensors',
'smartd', 'smartd',
'vmhost', 'vmhost',
'zfs', 'zfs',