Use logwatch parameter in data collection

Started by JMC Software, May 23, 2014, 01:07:17 PM

Previous topic - Next topic

JMC Software

Hello,

I have configured logwatch to parse the content of my windows server application event log.
I can now collect over DCI Number of records processed and Number of records matched.
And i can fire an alarm over my event policy rule where i can see the parsed parameter content (it is a float value).
Is it possible to configure a DCI that will collect this value?

Thanks for any help.

Regards

Victor Kirhenshtein

Hi!

Yes, it's possible. You can create "situation" object and in event processing policy set situation's attribute. Then you can create DCI with source "Internal" and parameter "Dummy" and in transformation script read value from situation's attribute. Sample script to access situation can be found here: https://www.netxms.org/documentation/adminguide/event-processing.html#situations.

Best regards,
Victor

JMC Software


JMC Software

Hello Victor,

It seems i have still something going wrong.
My DCI History is still 0.0.

I have the Event that works well an reads the Application Event Log.
To check it i have an action that writes the value as an Event in Netxms and the values are correct.
I have also the action that updates the situation, an the value is also updated correctly.
If i test my transformation in the DCI it shows also the right value, so it can access the situation correctly.
But the DCI itselfs stores all the time 0.0.

Is this a Bug or are i missing something?

Thanks for your feedback.

Regards

José

Victor Kirhenshtein

Hi!

Try to change DCI data type to string - will it show correct history then?

Best regards,
Victor

JMC Software

Yesss it shows....
I was thinking it recognize the datatype itself.
Can i make a strong type convert in transformation script?

Thanks again.

Regards

José

Victor Kirhenshtein

#6
Hi!

Actually that means that server did not recognize string value as floating point number. You can try to set data type to float and use explicit cast with real(), like


return real(res)


It is also possible that your locale expects floating point numbers to have , instead of .

Best regards,
Victor

JMC Software

Hello Victor,

return real(res)

Doesn't work also.

Have you any other suggestions.

Thanks and Regards

José