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

  • From: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • To: "Le, Binh T." <Binh.Le@xxxxxxx>
  • Date: Tue, 21 Jun 2016 09:23:08 -0500

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@xxxxxxx> 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@xxxxxxxxxxxxx [mailto:
oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Chris Taylor
*Sent:* Tuesday, June 21, 2016 9:58 AM
*To:* ORACLE-L <oracle-l@xxxxxxxxxxxxx>
*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



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



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



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.**

Other related posts: