• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Nalin A. · May 04, 2012 at 05:28 PM · plugins

Generic Command Execution Output capture

Hi,

Can anyone suggest how can we capture the output of the generic command we are executing? I mean if I'm configuring email alert for some generic command, can I pass the output in the email message body?

Please suggest.

Regards,

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

6 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Don M. · Mar 17, 2014 at 06:42 PM

 

I am not a programmer, and I really do like the Generic Execution Plugin, I too need to figure out a way to get what is returned in the detailed message section of the GEP.  I am currently running scripts remotely that return a single number, and it is displayed on the message detail.  You suggested "altering" the GEP to only execute commands known to give numeric responses (From the script I am executing, I have that covered, my question is what do I alter, and more importantly, How do I alter it. 

If you could explain how to do this I'd be very appreciative.

Thank you

Don Meuth

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Eugene T. · Mar 18, 2014 at 11:18 AM 0
Share

Hi Don,

I've just replied on your post from another thread on this topic. Please let me know if my reply will work for you.

Eugene.

avatar image

Answer by Rob V. · Jun 06, 2012 at 07:24 PM

Hi Nalin,

The thing about the Generic Execution Plugin is that it's "generic", and can run any command. The shape and type of the output is unknown to the GEP, so it may or may not be a single value, and may or may not be numeric.  The idea is that you're allowed to process the output (with a regex) and come up with a determination of success or failure that you reflect in the return measure, "executionSuccess".

The GEP can and does capture the output so you can see that by looking at the result of the monitor running the GEP. You just can't include that output as part of measure processing. For example, here's the output of a GEP running the "ping" command testing for availability of a server:

 
 
As you suggest, you could alter the GEP to only execute commands known to give numeric results, and create a measure (or set of measures) to capture those results. You might be better off starting with the Windows or Linux Performance Monitor plugins as a model however, rather than the GEP.
 
Rob
 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · May 11, 2012 at 04:11 PM

Hi Nalin

I dont think this is possible right now. Your Generic Executor acts as a Monitor and with that returns measure values (0 or 1 in your case).
The email is an Action that will be sent in case the measure value (0 or 1) exceeds a certain threshold. There is no way for the Action Plugin to get more contextual information from the Generic Execution Command

What you could do is create your own Action Plugin that sends an email. in that plugin as a first step you try to capture additional information that you want to include in the email text, e.g: you could re-execute the command monitored by your generic executor.

Not sure if this is what you want - but - at least it is a thought for a workaround

Andi

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Nalin A. · Jun 06, 2012 at 02:33 PM 0
Share

Hi Andreas

Currently I am not able to concentrate on this. But if we see the linix monitoring plugin it does allow to capture data as it has the measure which stores the data. Now the time I will spent (when I get) is to modify the GECP to apply the same changes as in linux monitoring.

Regards

Nalin

avatar image

Answer by Nalin A. · May 11, 2012 at 03:36 PM

Hello Experts,

Any suggestion?

Regards

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Nalin A. · May 08, 2012 at 03:30 PM

Hello Andreas,

The default measure for Generic Command Execution is "executionSuccess" whose output is either 0 or 1.  Since this is the only measure available we have set incident on success criteria of this measure and as a result we always get the value of "executionSuccess" in mail.

Can you please suggest a way to pass the captured command output to mail?

Regards

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · May 04, 2012 at 10:51 PM

Hi Nalin

Can you be a bit more specific on your use case?
You can for instance execute a Generic Command on a scheduled basis using our Generic Monitor Plugin. The plugin will execute a cmd line and will return a value from the output. This value will be seen by dynaTrace as Measure returned from your monitor. You can then create an Incident based on that measure. When you define an email alert action you will receive the actual measure value that your command returned in case the value exceeds your defined threshold.

Let me know if this helps

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Nalin A. · May 07, 2012 at 02:08 PM 0
Share

Hello Andreas,

Thanks for reply. Let me check and confirm you back on this.

Regards

avatar image amol k. Nalin A. · May 07, 2012 at 09:16 PM 0
Share

Hi,

Please revert if any body got resolution to send command output in email alert as I want to send Email alert to application owner so he will not understand measure value.

Please reply ASAP.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Integrating dynaTrace into other tools with SNMP v2

Could you please provide details on how to integate Dynatrace with the Jenkins pipeline. In particular running Jmeter tests

Error building a custom plugin I am developing

Setting Metric Group value in Custom Plugin Development

Plugin Development - Packaging Of Plugin

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A