Ad Widget

Collapse

Getting only the CPU % Use with key system.cpu.util

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Molusco
    Junior Member
    • Dec 2019
    • 20

    #1

    Getting only the CPU % Use with key system.cpu.util

    Hi, is there a way to get only the CPU % usage with the line below, not the idle, interrupt, etc?

    items= zh.item.get(output=['hostid', 'name' , 'key_'], search={'key_':'system.cpu.util'})

    I Want to get only these lines

    CPU Use % system.cpu.util 0.0959

    Not these ones

    CPU $2 time system.cpu.util[,idle] 99.7602

    CPU $2 time system.cpu.util[,interrupt] 0.0000
    Last edited by Molusco; 27-12-2019, 13:08. Reason: api pyzabbix
Working...