RE: 12c EMCLI help needed (I'm almost there, but not quite ...)

From: Le, Binh T. <Binh.Le_at_lfg.com>
Date: Tue, 21 Jun 2016 14:30:35 +0000
Message-ID: <D22572E84CF68E4DB2E0E1171FB3719460AB8F22_at_NC2PWEX503.us.ad.lfg.com>



Hi Chris,

I’ve been maintaining OEM for my company and exploring the repository for various reasons.

Thanks,
Binh

From: Chris Taylor [mailto:christopherdtaylor1994_at_gmail.com] Sent: Tuesday, June 21, 2016 10:23 AM
To: Le, Binh T. <Binh.Le_at_lfg.com>
Cc: ORACLE-L <oracle-l_at_freelists.org> Subject: Re: 12c EMCLI help needed (I'm almost there, but not quite ...)

Ok, that gives me what I needed.

How did you know to pull that out that information that way? Just exploring the repository or did you find it documented somewhere? That is VERY useful!

Chris

On Tue, Jun 21, 2016 at 9:16 AM, Le, Binh T. <Binh.Le_at_lfg.com<mailto:Binh.Le_at_lfg.com>> wrote: Hi Chris,

Try this:

select './emcli modify_threshold -target_name="'|| tms.target_name || '" -target_type="'|| tms.target_type||

'" -metric="'|| replace(tms.metric_name,'$','\$') ||
'" -column="'|| tms.metric_column ||'" -key_columns=";" -critical_threshold="TNS-[ ]*0*(1169|1189|12508" -prevent_override="0" ' stmt ,tms.target_name,tms.target_type,tms.metric_name,tms.metric_column,tms.collection_name,tms.warning_operator,tms.warning_threshold
,tms.critical_operator,tms.critical_threshold,tms.warning_action_type,tms.warning_action_job_type,tms.warning_action_job_owner,tms.key_value from sysman.mgmt$target_metric_settings tms
where tms.target_type in ('oracle_listener')

   and tms.metric_name = 'TNS_ERRORS'
   and tms.metric_column = 'tnserrmsg'
   and instr(target_name,'SCAN') = 0
order by tms.target_name;

From: oracle-l-bounce_at_freelists.org<mailto:oracle-l-bounce_at_freelists.org> [mailto:oracle-l-bounce_at_freelists.org<mailto:oracle-l-bounce_at_freelists.org>] On Behalf Of Chris Taylor Sent: Tuesday, June 21, 2016 9:58 AM
To: ORACLE-L <oracle-l_at_freelists.org<mailto:oracle-l_at_freelists.org>> Subject: 12c EMCLI help needed (I'm almost there, but not quite ...)

We run multiple listeners and I need to remove the TNS-1190 from each listener and I want to use EMCLI to do it.

I run this:

 emcli get_threshold -target_type="oracle_listener" -target_name=LISTENER_myhost.mydomain.org<http://LISTENER_myhost.mydomain.org>

Which gives me this: http://pastebin.com/RhHRqjqZ

Now, I want to use emcli to modify the threshold but I'm getting an error.

Here's what I run followed by the error - so I need to know what I should be providing as I'm stumped?

./emcli modify_threshold -target_type="oracle_listener" -metric="TNS_ERRORS : tnserrmsg" -critical_threshold="TNS-[ ]*0*(1169|1189|12508)" -target_name=LISTENER_myhost.mydomain.org<http://LISTENER_myhost.mydomain.org>

Returns:
Error: Either Metric Group or Metric Column not provided.

So I tried providing the column name:
emcli modify_threshold -target_type="oracle_listener" -metric="TNS_ERRORS : tnserrmsg" -column="Metric Internal Name" -critical_threshold="TNS-[ ]*0*(1169|1189|12508)" -target_name=LISTENER_myhost.mydomain.org<http://LISTENER_myhost.mydomain.org>

And I get:
Error: Metric Group "TNS_ERRORS : tnserrmsg" or Metric Column "Metric Internal Name" does not exist for target type "oracle_listener"

Any helps/tips/suggestions - I can't figure out what should be for the "-metric" and the "-column" fields on this.

Thanks!
Chris

Notice of Confidentiality: **This E-mail and any of its attachments may contain Lincoln National Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Lincoln National Corporation family of companies. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. Thank You.**

Notice of Confidentiality: **This E-mail and any of its attachments may contain Lincoln National Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Lincoln National Corporation family of companies. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. Thank You.**

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 21 2016 - 16:30:35 CEST

Original text of this message