

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi!
I cant find answer anywhre here.
I have shell script, that monitor directory content coutn ( ls -l | ws -l)
I need to save this value in coda.
So, in measurement threshold policy set:
Do I need do made something else?
May be I need to create this Metric on CODA before I create policy?
Now this is not work.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I find solution.
It is not possible to store custom metric in CODA.
So, right way is to set Data Source not CODA, but custom element.
After this, all works fine.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
did you send your value back to the policy with the opcmon command?
Command Syntax to submit monitored values:
opcmon <parameterlist>
Parameter Value Required
monitor_name= name of monitor to deliver value to yes
object= component which caused/detected no
or was affected by the problem
-option <var>= additional parameter of any kind no
supplying a value; may be given
multiple times
you can look also in a powerpoint presentation:
http://nas.wowunix.com/down/manual/etc/ovo%20%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C/mod11_sc.ppt


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Here is the listing of my script:
#cat getdircontentcount.sh
#!/bin/sh
FILESCOUNT=`ls $1 | wc -l`
opcmon $2=$FILESCOUNT
in policy I use: getdircontentcount.sh <directory> <policy>
So? I think? script works fine.
Any suggestion?
I just need some way to collect custom metric in any of OA database ( CODA or PA nevermind). Also I need to see this metric usint Performance manager.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
for me, i miss in the last row in your script, the opcmon command with policyname.
In your excample: opcmon TestCollectMetric=$FILESCOUNT
Look in the presentation slide 9 or 15
Tipp: you can look at the in the database with the command: ovcodautil -dumpdcoda or ovcodautil -dumpds [Datasource]


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I find solution.
It is not possible to store custom metric in CODA.
So, right way is to set Data Source not CODA, but custom element.
After this, all works fine.