mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-08-22 15:15:35 +00:00
other sensors
This commit is contained in:
@ -81,6 +81,9 @@ $ ansible-playbook ansible_playbook.yaml --tags config
|
|||||||
`android_sensor_hinge_angle_degrees` - How much is the hinge opened
|
`android_sensor_hinge_angle_degrees` - How much is the hinge opened
|
||||||
`android_sensor_accelerometer{axis}` - Data from the accelerometer
|
`android_sensor_accelerometer{axis}` - Data from the accelerometer
|
||||||
`android_sensor_magnetic_field_tesla{axis}` - Data from the magnetic field sensor in base units
|
`android_sensor_magnetic_field_tesla{axis}` - Data from the magnetic field sensor in base units
|
||||||
|
`android_sensor_gravity_acceleration` - Data from gravity acceleration sensor, in m/s^2 units
|
||||||
|
`android_sensor_linear_acceleration` - Data from the Android linear acceleration sensor in m/s^2 units.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Miscellaneous
|
### Miscellaneous
|
||||||
|
@ -179,6 +179,26 @@ class AndroidCustomExporter(private val metricEngine: MetricsEngine) : Collector
|
|||||||
addAxisSpecificGauge(gauge, baseUnits)
|
addAxisSpecificGauge(gauge, baseUnits)
|
||||||
mfs.add(gauge)
|
mfs.add(gauge)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
metricEngine.hwSensorsValues().gravityAcceleration?.let {
|
||||||
|
val gauge = GaugeMetricFamily(
|
||||||
|
"android_sensor_gravity_acceleration",
|
||||||
|
"Gravity acceleration sensor data in m/s^2",
|
||||||
|
listOf("axis")
|
||||||
|
)
|
||||||
|
addAxisSpecificGauge(gauge, it)
|
||||||
|
mfs.add(gauge)
|
||||||
|
}
|
||||||
|
|
||||||
|
metricEngine.hwSensorsValues().linearAcceleration?.let {
|
||||||
|
val gauge = GaugeMetricFamily(
|
||||||
|
"android_sensor_linear_acceleration",
|
||||||
|
"Data from the Android linear acceleration sensor in m/s^2 units.",
|
||||||
|
listOf("axis")
|
||||||
|
)
|
||||||
|
addAxisSpecificGauge(gauge, it)
|
||||||
|
mfs.add(gauge)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun collectScrapeDuration(mfs : MutableList<MetricFamilySamples>, startTime : Long){
|
private fun collectScrapeDuration(mfs : MutableList<MetricFamilySamples>, startTime : Long){
|
||||||
|
@ -42,7 +42,7 @@ class HwSensorsCache(
|
|||||||
var pressureHectoPascal : Double? = null,
|
var pressureHectoPascal : Double? = null,
|
||||||
var proximityCentimeters : Double? = null, //DONE
|
var proximityCentimeters : Double? = null, //DONE
|
||||||
|
|
||||||
var gravityAcceleration : AxisSpecificGauge? = null,
|
var gravityAcceleration : AxisSpecificGauge? = null, //DONE
|
||||||
var linearAcceleration : AxisSpecificGauge? = null,
|
var linearAcceleration : AxisSpecificGauge? = null,
|
||||||
var rotationVectorValues : AxisSpecificGauge? = null,
|
var rotationVectorValues : AxisSpecificGauge? = null,
|
||||||
var rotationVectorCosinusThetaHalf : Double? = null,
|
var rotationVectorCosinusThetaHalf : Double? = null,
|
||||||
|
Reference in New Issue
Block a user