Unofficial Zabbix Agent for Android

I’ve developed an Android Agent for Android for my own use. Here’s the list of supported item/keys :

agent.active_check_status : 1 if active check are enabled, 0 otherwise
agent.hostname : agent hostname as specified in app’s preferences
agent.ping
agent.version
android.manufacturer : manufacturer of the device
android.model : model of the device
app.foreground : package name of the current foreground app (not supported on Android >= 5.0)
app.running : json formated list of running apps (not supported on Android >= 5.0)
display.count : number of valid logical displays
display.state[index] : get the state of a display (see https://developer.android.com/reference/android/view/Display#getState())
gps[] : output location of the device (latitude/longitude/altitude/accuracy in json)
gps.latitude[] / gps.longitude[] / gps.altitude[] / gps.accuracy[] : output location of the device (latitude/longitude), altitude, accuracy (in meters) as a float.
net.carrier : network carrier name
net.connectivity: device connectivity, one of 2G, 3G, 4G
net.if.in[if,] : see zabbix documentation. This item does not work for Android 10+ (https://developer.android.com/about/versions/10/privacy/changes#proc-net-filesystem)
net.if.out[if,] : see zabbix documentation. This item does not work for Android 10+ (https://developer.android.com/about/versions/10/privacy/changes#proc-net-filesystem)
net.signal_strength: cellular signal strength (0 = very poor, 4 = very strong)
net.{mobile,total}.{rx_bytes,tx_bytes,rx_packets,tx_packets} : bytes/packets received/transmitted on mobile/all interfaces on the device.
net.roaming : whether device is currently in roaming
net.wifi.bssid : MAC of the BSSID the device is currently connected to using WiFi. You need to enable access to GPS/Location query in app settings and enable GPS in your device for Android > 8.0.
net.wifi.status : 1 = wifi connected, 0 = not connected
net.wifi.ssid : name of the currently connected SSID. You need to enable access to GPS/Location query in app settings and enable GPS in your device for Android > 8.0.
net.wifi.signal : wifi signal strength, from 0 (low) to 4 (great)
power.battery_level
power.battery_temperature
power.is_interactive : returns true if device is ready to interact with the user (screen on). See PowerManager.isInteractive from Android API for more info.
power.source : one of “ac”, “usb”, “wireless”, “unplugged”
power.status : one of “charging”, “full”, “discharging”
proc.cpu.util[] : cpu usage in % for specified process name, you need to have a rooted device for this item to work
proc.mem[]: memory usage in byte for the specified process name, you need to have a rooted device for this item to work
sensor.light : light sensor value in lux
sensor.proximity : proximity sensor value in cm
sensor.temperature : temperature sensor value in °C
system.cpu.load[]
system.cpu.num : for big.LITTLE CPU, only number of CPU in active cluster will count
system.cpu.freq[number,type] : get cur/min/max CPU frequency for specified core number
system.hostname : device’s hostname
system.localtime[] : system time
system.sw.arch
system.sw.os[]
system.uname
system.uptime : number of seconds since device boot
thermal.discovery : list all thermal sensors
thermal.type[index] : get thermal sensor name for sensor “index” (integer)
thermal.value[index] : get thermal sensor value for sensor “index” (integer)
vfs.fs.size[fs,]
vm.memory.size[total] : total memory in MB
vm.memory.size[free] : memory available in MB
web.page.get[host,,]
web.page.perf[host,,] : since android 9, only HTTPS queries are supported. Eg: web.page.perf[google.com,/,443]

Supported discovery of network interfaces, filesystems and thermal zones (various temperature sensors).

You can add your own UserParameters in the settings, so you can call custom scripts to return any data you need.

Please remember to disable battery optimization for this app to work correctly when your device goes to sleep. If the agent still stops responding after some time, enable “Acquire wake lock” from settings menu but remember it will quickly drain your battery if not on AC.

Download agent APK

Download zabbix server template for the android agent

Using UserParameter with Zabbix Agent for Android


Comments

Leave a Reply