cosmostat active host inventory file api
This commit is contained in:
@ -247,5 +247,20 @@
|
||||
"metrics": {
|
||||
"placeholder": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "BAT",
|
||||
"description": "Battery - {Device Name} - capacity {Capacity}",
|
||||
"multi_check": "True",
|
||||
"device_list": "acpi | grep Battery | cut -d: -f1",
|
||||
"properties": {
|
||||
"Device Name": "echo {this_device}",
|
||||
"Capacity": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .design_capacity_mah' "
|
||||
},
|
||||
"metrics": {
|
||||
"Percent Full": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .charge_percent'",
|
||||
"State": "acpi -V | jc --acpi | jq '.[] | select(.type==\"Battery\") | .state'"
|
||||
},
|
||||
"precheck": "acpi | grep Battery | wc -l"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user