Franziska Kunsmann
0a131b4248
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
447 lines
15 KiB
Python
447 lines
15 KiB
Python
def dashboard_row_ipmitool(panel_id, node):
|
|
return {
|
|
'title': 'ipmitool',
|
|
'collapse': False,
|
|
'editable': False,
|
|
'height': '250px',
|
|
'panels': [
|
|
{
|
|
'aliasColors': {},
|
|
'bars': False,
|
|
'dashLength': 10,
|
|
'dashes': False,
|
|
'datasource': None,
|
|
'fieldConfig': {
|
|
'defaults': {
|
|
'displayName': '${__field.labels.name}'
|
|
},
|
|
'overrides': []
|
|
},
|
|
'fill': 0,
|
|
'fillGradient': 0,
|
|
'hiddenSeries': False,
|
|
'id': next(panel_id),
|
|
'legend': {
|
|
'alignAsTable': False,
|
|
'avg': False,
|
|
'current': False,
|
|
'hideEmpty': True,
|
|
'hideZero': True,
|
|
'max': False,
|
|
'min': False,
|
|
'rightSide': False,
|
|
'show': True,
|
|
'total': False,
|
|
'values': False
|
|
},
|
|
'lines': True,
|
|
'linewidth': 1,
|
|
'NonePointMode': 'None',
|
|
'options': {
|
|
'alertThreshold': True
|
|
},
|
|
'percentage': False,
|
|
'pluginVersion': '7.5.5',
|
|
'pointradius': 2,
|
|
'points': False,
|
|
'renderer': 'flot',
|
|
'seriesOverrides': [],
|
|
'spaceLength': 10,
|
|
'span': 8,
|
|
'stack': False,
|
|
'steppedLine': False,
|
|
'targets': [
|
|
{
|
|
'groupBy': [
|
|
{'type': 'time', 'params': ['$__interval']},
|
|
{'type': 'fill', 'params': ['linear']},
|
|
],
|
|
'orderByTime': "ASC",
|
|
'policy': "default",
|
|
'query': f"""from(bucket: "telegraf")
|
|
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
|
|> filter(fn: (r) =>
|
|
r["_measurement"] == "ipmi_sensor" and
|
|
r["unit"] == "degrees_c" and
|
|
r["host"] == "{node.name}"
|
|
)
|
|
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
|
|> yield(name: "cpu")""",
|
|
'resultFormat': 'time_series',
|
|
'select': [[
|
|
{'type': 'field', 'params': ['value']},
|
|
{'type': 'mean', 'params': []},
|
|
]],
|
|
"tags": []
|
|
},
|
|
],
|
|
'thresholds': [],
|
|
'timeRegions': [],
|
|
'title': 'temperatures',
|
|
'tooltip': {
|
|
'shared': True,
|
|
'sort': 0,
|
|
'value_type': 'individual'
|
|
},
|
|
'type': 'graph',
|
|
'xaxis': {
|
|
'buckets': None,
|
|
'mode': 'time',
|
|
'name': None,
|
|
'show': True,
|
|
'values': []
|
|
},
|
|
'yaxes': [
|
|
{
|
|
'format': 'celsius',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': 0,
|
|
'show': True,
|
|
},
|
|
{
|
|
'format': 'short',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': None,
|
|
'show': False,
|
|
}
|
|
],
|
|
'yaxis': {
|
|
'align': False,
|
|
'alignLevel': None
|
|
}
|
|
},
|
|
{
|
|
'aliasColors': {},
|
|
'bars': False,
|
|
'dashLength': 10,
|
|
'dashes': False,
|
|
'datasource': None,
|
|
'fieldConfig': {
|
|
'defaults': {
|
|
'displayName': '${__field.labels.name}'
|
|
},
|
|
'overrides': []
|
|
},
|
|
'fill': 0,
|
|
'fillGradient': 0,
|
|
'hiddenSeries': False,
|
|
'id': next(panel_id),
|
|
'legend': {
|
|
'alignAsTable': False,
|
|
'avg': False,
|
|
'current': False,
|
|
'hideEmpty': True,
|
|
'hideZero': True,
|
|
'max': False,
|
|
'min': False,
|
|
'rightSide': False,
|
|
'show': True,
|
|
'total': False,
|
|
'values': False
|
|
},
|
|
'lines': True,
|
|
'linewidth': 1,
|
|
'NonePointMode': 'None',
|
|
'options': {
|
|
'alertThreshold': True
|
|
},
|
|
'percentage': False,
|
|
'pluginVersion': '7.5.5',
|
|
'pointradius': 2,
|
|
'points': False,
|
|
'renderer': 'flot',
|
|
'seriesOverrides': [],
|
|
'spaceLength': 10,
|
|
'span': 4,
|
|
'stack': False,
|
|
'steppedLine': False,
|
|
'targets': [
|
|
{
|
|
'groupBy': [
|
|
{'type': 'time', 'params': ['$__interval']},
|
|
{'type': 'fill', 'params': ['linear']},
|
|
],
|
|
'orderByTime': "ASC",
|
|
'policy': "default",
|
|
'query': f"""from(bucket: "telegraf")
|
|
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
|
|> filter(fn: (r) =>
|
|
r["_measurement"] == "ipmi_sensor" and
|
|
r["unit"] == "rpm" and
|
|
r["host"] == "{node.name}"
|
|
)
|
|
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
|
|> yield(name: "fan")""",
|
|
'resultFormat': 'time_series',
|
|
'select': [[
|
|
{'type': 'field', 'params': ['value']},
|
|
{'type': 'mean', 'params': []},
|
|
]],
|
|
"tags": []
|
|
},
|
|
],
|
|
'thresholds': [],
|
|
'timeRegions': [],
|
|
'title': 'fans',
|
|
'tooltip': {
|
|
'shared': True,
|
|
'sort': 0,
|
|
'value_type': 'individual'
|
|
},
|
|
'type': 'graph',
|
|
'xaxis': {
|
|
'buckets': None,
|
|
'mode': 'time',
|
|
'name': None,
|
|
'show': True,
|
|
'values': []
|
|
},
|
|
'yaxes': [
|
|
{
|
|
'format': 'rotrpm',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': 0,
|
|
'show': True,
|
|
'decimals': 0,
|
|
},
|
|
{
|
|
'format': 'short',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': None,
|
|
'show': False,
|
|
}
|
|
],
|
|
'yaxis': {
|
|
'align': False,
|
|
'alignLevel': None
|
|
}
|
|
},
|
|
{
|
|
'aliasColors': {},
|
|
'bars': False,
|
|
'dashLength': 10,
|
|
'dashes': False,
|
|
'datasource': None,
|
|
'fieldConfig': {
|
|
'defaults': {
|
|
'displayName': '${__field.labels.name}'
|
|
},
|
|
'overrides': []
|
|
},
|
|
'fill': 0,
|
|
'fillGradient': 0,
|
|
'hiddenSeries': False,
|
|
'id': next(panel_id),
|
|
'legend': {
|
|
'alignAsTable': False,
|
|
'avg': False,
|
|
'current': False,
|
|
'hideEmpty': True,
|
|
'hideZero': True,
|
|
'max': False,
|
|
'min': False,
|
|
'rightSide': False,
|
|
'show': True,
|
|
'total': False,
|
|
'values': False
|
|
},
|
|
'lines': True,
|
|
'linewidth': 1,
|
|
'NonePointMode': 'None',
|
|
'options': {
|
|
'alertThreshold': True
|
|
},
|
|
'percentage': False,
|
|
'pluginVersion': '7.5.5',
|
|
'pointradius': 2,
|
|
'points': False,
|
|
'renderer': 'flot',
|
|
'seriesOverrides': [],
|
|
'spaceLength': 10,
|
|
'span': 5,
|
|
'stack': False,
|
|
'steppedLine': False,
|
|
'targets': [
|
|
{
|
|
'groupBy': [
|
|
{'type': 'time', 'params': ['$__interval']},
|
|
{'type': 'fill', 'params': ['linear']},
|
|
],
|
|
'orderByTime': "ASC",
|
|
'policy': "default",
|
|
'query': f"""from(bucket: "telegraf")
|
|
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
|
|> filter(fn: (r) =>
|
|
r["_measurement"] == "ipmi_sensor" and
|
|
r["unit"] == "volts" and
|
|
r["host"] == "{node.name}"
|
|
)
|
|
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
|
|> yield(name: "cpu")""",
|
|
'resultFormat': 'time_series',
|
|
'select': [[
|
|
{'type': 'field', 'params': ['value']},
|
|
{'type': 'mean', 'params': []},
|
|
]],
|
|
"tags": []
|
|
},
|
|
],
|
|
'thresholds': [],
|
|
'timeRegions': [],
|
|
'title': 'voltages',
|
|
'tooltip': {
|
|
'shared': True,
|
|
'sort': 0,
|
|
'value_type': 'individual'
|
|
},
|
|
'type': 'graph',
|
|
'xaxis': {
|
|
'buckets': None,
|
|
'mode': 'time',
|
|
'name': None,
|
|
'show': True,
|
|
'values': []
|
|
},
|
|
'yaxes': [
|
|
{
|
|
'format': 'volts',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': 0,
|
|
'show': True,
|
|
},
|
|
{
|
|
'format': 'short',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': None,
|
|
'show': False,
|
|
}
|
|
],
|
|
'yaxis': {
|
|
'align': False,
|
|
'alignLevel': None
|
|
}
|
|
},
|
|
{
|
|
'aliasColors': {},
|
|
'bars': False,
|
|
'dashLength': 10,
|
|
'dashes': False,
|
|
'datasource': None,
|
|
'fieldConfig': {
|
|
'defaults': {
|
|
'displayName': '${__field.labels.name}'
|
|
},
|
|
'overrides': []
|
|
},
|
|
'fill': 0,
|
|
'fillGradient': 0,
|
|
'hiddenSeries': False,
|
|
'id': next(panel_id),
|
|
'legend': {
|
|
'alignAsTable': False,
|
|
'avg': False,
|
|
'current': False,
|
|
'hideEmpty': True,
|
|
'hideZero': True,
|
|
'max': False,
|
|
'min': False,
|
|
'rightSide': False,
|
|
'show': True,
|
|
'total': False,
|
|
'values': False
|
|
},
|
|
'lines': True,
|
|
'linewidth': 1,
|
|
'NonePointMode': 'None',
|
|
'options': {
|
|
'alertThreshold': True
|
|
},
|
|
'percentage': False,
|
|
'pluginVersion': '7.5.5',
|
|
'pointradius': 2,
|
|
'points': False,
|
|
'renderer': 'flot',
|
|
'seriesOverrides': [],
|
|
'spaceLength': 10,
|
|
'span': 7,
|
|
'stack': False,
|
|
'steppedLine': False,
|
|
'targets': [
|
|
{
|
|
'groupBy': [
|
|
{'type': 'time', 'params': ['$__interval']},
|
|
{'type': 'fill', 'params': ['linear']},
|
|
],
|
|
'orderByTime': "ASC",
|
|
'policy': "default",
|
|
'query': f"""from(bucket: "telegraf")
|
|
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
|
|> filter(fn: (r) =>
|
|
r["_measurement"] == "ipmi_sensor" and
|
|
r["unit"] == "watts" and
|
|
r["host"] == "{node.name}"
|
|
)
|
|
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
|
|> yield(name: "fan")""",
|
|
'resultFormat': 'time_series',
|
|
'select': [[
|
|
{'type': 'field', 'params': ['value']},
|
|
{'type': 'mean', 'params': []},
|
|
]],
|
|
"tags": []
|
|
},
|
|
],
|
|
'thresholds': [],
|
|
'timeRegions': [],
|
|
'title': 'power',
|
|
'tooltip': {
|
|
'shared': True,
|
|
'sort': 0,
|
|
'value_type': 'individual'
|
|
},
|
|
'type': 'graph',
|
|
'xaxis': {
|
|
'buckets': None,
|
|
'mode': 'time',
|
|
'name': None,
|
|
'show': True,
|
|
'values': []
|
|
},
|
|
'yaxes': [
|
|
{
|
|
'format': 'watts',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': 0,
|
|
'show': True,
|
|
'decimals': 0,
|
|
},
|
|
{
|
|
'format': 'short',
|
|
'label': None,
|
|
'logBase': 1,
|
|
'max': None,
|
|
'min': None,
|
|
'show': False,
|
|
}
|
|
],
|
|
'yaxis': {
|
|
'align': False,
|
|
'alignLevel': None
|
|
}
|
|
},
|
|
],
|
|
}
|