Ad Widget

Collapse

math operations on macro values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dennistm
    Junior Member
    • Jul 2023
    • 7

    #1

    math operations on macro values

    I have a question about doing math operations on macro values.

    I'm using an external check to query wmi-data from several hosts. In this particular case I'm requesting cpu-usage. The check returns a json with data for all individual cpu's from that host. I use the 'name' value from that json for a LLD that is used in an item protype. The prototyp item is named 'Processor {#CPUID}' , with #CPUID being the name-value. This results in items created for every available cpu, named 'Processor 0', 'Processor 1', 'Processor 2', etcetera. This al works very well.

    But instead of starting with 'Processor 0', I'd like it to be named 'Processor 1', and 'Processor 1' renamed 'Processor 2' and so on. Is there some way to do a 'plus one' operation on the [#CPUID} macro value before I use it in the item name?
  • dennistm
    Junior Member
    • Jul 2023
    • 7

    #2
    .............
    Last edited by dennistm; 30-10-2023, 12:55. Reason: thought I solved it, but I didnt

    Comment

    Working...