Ad Widget

Collapse

Populate inventory with the last line from system.hw.cpu

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OttoK
    Junior Member
    • Jan 2013
    • 9

    #1

    Populate inventory with the last line from system.hw.cpu

    Hello,

    I've just configured the item system.hw.cpu to be collected and used to automatically populate inventory CPU field for the host.

    However, for multi-CPU machines the values are multi-line:
    Code:
    $ zabbix_agent -t system.hw.cpu
    [t|processor 0: GenuineIntel QEMU Virtual CPU version 0.12.3 working at 2526MHz
    processor 1: GenuineIntel QEMU Virtual CPU version 0.12.3 working at 2526MHz]
    ..but in the inventory only the first line is saved. Thus the inventory does not show the whole truth on how many CPUs a host has.

    Is it possible somehow to populate the inventory with the last line of the CPU list?

    Last line would be cool, since if it is something like processor 3: GenuineIntel QEMU Virtual CPU version 0.12.3 working at 2526MHz] then the admin looking at the inventory can directly spot from processor 3 that the host must have 4 CPUs. Currently the inventory always shows processor 0 which is not that good..
  • Komodoro
    Junior Member
    • Nov 2013
    • 4

    #2
    Have you tried to put it in the field of "hardware (full details)"?!
    At least you can see something.
    I'm trying that now, and this says not supported. :X I dunno if I have to do something in the configuration file of the agent in the machine. I'm still investigating it...

    Comment

    • OttoK
      Junior Member
      • Jan 2013
      • 9

      #3
      Yes, you are right, in "full details" field the all of the info is shown, spanning four lines (for four cores). Still, in the one-line version I'd like to see the last line, not the first line.

      Comment

      • Komodoro
        Junior Member
        • Nov 2013
        • 4

        #4
        Oh... that I dunno how to do.
        That maybe needs an work around.

        But were you just using the details line? Was that it?

        Comment

        Working...