Ad Widget

Collapse

New Discovery rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SaXior
    Junior Member
    • Sep 2015
    • 2

    #1

    New Discovery rule

    Hi.
    I have proxmox's server, so i want to monitor vm.
    In proxmox server, i run command: qm list
    VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID
    100 kali stopped 100 12.00 0
    101 kali2 stopped 101 12.00 0
    ...
    in /etc/zabbix/scripts/ i have vm_memory.sh, when i run this script the result is:
    {
    "data":[
    {"{#VMID}":"100"}
    ,{"{#VMID}":"101"}
    ,{"{#VMID}":"103"}
    ,{"{#VMID}":"108"}
    ,{"{#VMID}":"111"}
    ]
    }
    it's all VMID of my virtual machine. This is ok.

    in zabbix_agentd.conf - proxmox server the last line :
    UserParameter=vm.memory.usage[*],qm list | grep 1 | cut -c 44-47
    UserParameter=discovery.vm, /etc/zabbix/scripts/vm_memory.sh
    when run command in cli: qm list | grep 1 | cut -c 44-47
    100
    101
    103
    1000
    1111
    vm 100 use 100 mb ram, vm 101 use 101 mb ram, ...vm 111 use 1111 ram.
    Let's go to zabbix server.
    Create new discovery rule
    key:discovery.vm
    create new item prototypes:
    key: vm.memory.usage[{#VMID}]
    Type of information: Numeric
    Data type: Decimal
    Next, go to Configuration > hosts(proxmox) > Items :
    there is 5 result. but
    Received value [100 101 103 1000 1111] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
    this messages is for all my vm...
    Where is my error in configuration?
  • maxprox
    Junior Member
    • Apr 2017
    • 4

    #2
    hi,

    dit you solve your problem?
    I'm new in zabbix an I also will keep a watch on some proxmox servers.
    If you can show me/us your proxmox items - this would be great!

    regards,
    maxprox

    Comment

    • Luiz Antonio Oliveira
      Member
      • Feb 2007
      • 49

      #3
      If he receives a parameter, to find only what he needs, in this case ae, he after all the items, he will not know which to look for to give the value of the size

      vm.memory.usage[*],qm list | grep $1 | cut -c 44-47

      Comment

      Working...