Set Processor - adding a field wrong

I'm trying to get a numeric value based on a string value to monitor services.
When I'm getting a "Running" value I'm useing the SET Processor to add a new field with the value of 1.
And when I'm getting a "Stopped" value I'm useing the SET Processor to add to the same field with the value of 0.
But, it's created the field as a type "text" although i added the field to the index tamplate before i created the process itself.
I need it to be numeric value, so i could use that in a visualization to pick a color based on the value for the cell itself.
Thank in advance.

Hi @Mor123460

It would help if you posted your mapping and ingest pipeline index name etc..otherwise we a just guessing. The more details you provide in terms of actual code / configuration the more we can help

The behavior you are describing indicates you are setting to a field that does not have a proper mapping defined.

Thank you for your response, unfortunately I can't do that, I'm in closed environments.
But i did find work around that.
I added another processor that convert this new field and dump it to another field as intager.
And it created a new field that's an integer type.
After that i deleted the convert processor and changed the set Processor to the new intager field.
I know this is stupid, but for now it's working.
My only question is, what is the steps to do it right when I'm useing the set Processor, and how im creating a new field that I'm deciding what his type.

1 Like

Apologies but without at least a full dummy example I can't help.

I have noticed that when trying to convert types sometimes I had to use a temp variable.. but again just guessing without an example.

Perhaps someone else can help

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.