Topic
  • 9 replies
  • Latest Post - ‏2016-02-19T22:48:52Z by dchampeau
cwoliveira
cwoliveira
51 Posts

Pinned topic How to generate Datastream information with custom monitors

‏2014-02-18T18:29:03Z |

Hi,

I am testing fine some custom monitors. This is a sample shell that is running as SM Custom Monitor with no issues:

#!/bin/sh
echo "# message testmon01"
#echo ok
echo not_ok
exit 0;

 

So, my question is how to generate data from this type of custom monitor to new or existing Datastreams ? My custom monitors events are all displayed with "N/A" datastream, so reports from them do not display any data.

Under custom monitor configuration, I cannot find anything related to Datastream (see attached screenshot).

Is there someone with similar question / issue ?

 

This is system information:

Red Hat Enterprise Linux Server release 6.4 (Santiago)

ECM System Monitor 5.1.0.2

 

Regards,

Carlos

Updated on 2014-02-18T18:36:49Z at 2014-02-18T18:36:49Z by cwoliveira
  • cwoliveira
    cwoliveira
    51 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2014-02-27T01:43:39Z  

    Something should be missing on previous testing. Even with the N/A datastream and correct period and schedule, the ECM SM was able to generate reports with no issues, using the values (ok, not_ok, 0, 1, 2, 3, etc) returned by custom monitor via stdout.

    For now, question answered.

    Thanks,

    Carlos.

  • juepo
    juepo
    66 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2014-03-18T13:34:16Z  

    Something should be missing on previous testing. Even with the N/A datastream and correct period and schedule, the ECM SM was able to generate reports with no issues, using the values (ok, not_ok, 0, 1, 2, 3, etc) returned by custom monitor via stdout.

    For now, question answered.

    Thanks,

    Carlos.

    Carlos,

    you can set any kind of event detail in a custom monitor using this syntax inside the monitor script:

    echo "# _CALAMON_SET_SLOT_ error_id datastream_for_custom_monitor"
    echo "# _CALAMON_SET_SLOT_ source custom_monitor"
    echo "# _CALAMON_SET_SLOT_ sub_source calamon"

    The slot "error_id" is mapped by the ECM SM server to datastream if the event comes from the monitoring engine of the agent. Source and sub_source are mapped one to one.

    Everything else echoed to std_out with a leading # sign will be interpreted as part of the message, only if # is followed by _CALAMON_SET_SLOT_ it has a special interpretation. Anything echoed to std_out with a leading # will be interpreted as value and then compared to the values in the escalation table from the monitor configuration.

    Regards

    Juergen

    Regards,

  • cwoliveira
    cwoliveira
    51 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2014-03-19T19:32:40Z  
    • juepo
    • ‏2014-03-18T13:34:16Z

    Carlos,

    you can set any kind of event detail in a custom monitor using this syntax inside the monitor script:

    echo "# _CALAMON_SET_SLOT_ error_id datastream_for_custom_monitor"
    echo "# _CALAMON_SET_SLOT_ source custom_monitor"
    echo "# _CALAMON_SET_SLOT_ sub_source calamon"

    The slot "error_id" is mapped by the ECM SM server to datastream if the event comes from the monitoring engine of the agent. Source and sub_source are mapped one to one.

    Everything else echoed to std_out with a leading # sign will be interpreted as part of the message, only if # is followed by _CALAMON_SET_SLOT_ it has a special interpretation. Anything echoed to std_out with a leading # will be interpreted as value and then compared to the values in the escalation table from the monitor configuration.

    Regards

    Juergen

    Regards,

    Thanks Juergen by "error_id" tip, now the custom monitor is populating a DataStream also.

    Unfortunately I didn't find references about "_CALAMON_SET_SLOT_" feature on IBM ECM SM product documentation before.

    Regards,

    Carlos.

  • juepo
    juepo
    66 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2014-03-20T07:43:55Z  

    Thanks Juergen by "error_id" tip, now the custom monitor is populating a DataStream also.

    Unfortunately I didn't find references about "_CALAMON_SET_SLOT_" feature on IBM ECM SM product documentation before.

    Regards,

    Carlos.

    Carlos,

    This is not described in the ECM SM docs, it's advanced konowledge! ;-)

    We teach this in our ECM SM admin courses (individual training courses onsite).

    Regards,

    Juergen

  • dchampeau
    dchampeau
    26 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2016-02-16T01:06:06Z  
    • juepo
    • ‏2014-03-20T07:43:55Z

    Carlos,

    This is not described in the ECM SM docs, it's advanced konowledge! ;-)

    We teach this in our ECM SM admin courses (individual training courses onsite).

    Regards,

    Juergen

    how would this look on a Windows server?

     

    Is there a space after #

     

    echo "# _CALAMON_SET_SLOT_ error_id datastream_for_custom_monitor"

  • MW2505
    MW2505
    49 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2016-02-16T08:30:23Z  

    how would this look on a Windows server?

     

    Is there a space after #

     

    echo "# _CALAMON_SET_SLOT_ error_id datastream_for_custom_monitor"

    Hi David, 

     

    yes there is a space after #.

     

    Regards Michael

  • dchampeau
    dchampeau
    26 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2016-02-17T15:00:41Z  
    • MW2505
    • ‏2016-02-16T08:30:23Z

    Hi David, 

     

    yes there is a space after #.

     

    Regards Michael

    will this work in the Windows world?

     

    I am using a custom monitor to parse a .txt file and I want to add a datastream. I have tried to above by adding the three lines to the .txt but cannot get the datastream to be set.

     

    thank you

  • juepo
    juepo
    66 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2016-02-19T09:50:25Z  

    will this work in the Windows world?

     

    I am using a custom monitor to parse a .txt file and I want to add a datastream. I have tried to above by adding the three lines to the .txt but cannot get the datastream to be set.

     

    thank you

    David,

    Please post the custom monitor script and screenshot of the Monitoring Manager showing the monitors configuration.

    Regards

    Juergen

  • dchampeau
    dchampeau
    26 Posts

    Re: How to generate Datastream information with custom monitors

    ‏2016-02-19T22:48:52Z  
    • juepo
    • ‏2016-02-19T09:50:25Z

    David,

    Please post the custom monitor script and screenshot of the Monitoring Manager showing the monitors configuration.

    Regards

    Juergen

    Hi Juergen,

     

    Just got it working.

     

    Thank you for the hint. Very helpful.