Bump. Anyone have any insight on this? I've created a Monitoring Credential set and I can set the values in EM. I just don't know how to reference them in my script. I've looked at the host sample and there is an example of using Credentials for a Jobtype but that's not what I'm using and I can't make the leap to just a metric collection script.
Basically in the "CredentialSetColumn" use the SET_COLUMN attribute to set the credential handle and you can directly refer to it in your query.
For example, If you define the following credential set with credential handles "sampleUser" or "samplePassword" or "sampleRole", you can directly use the "sampleUser", "samplePassword" and "sampleRole" from the above CredentialSet in your Query
<CredentialSet NAME="SampleCredsMon" CREDENTIAL_TYPE="SampleCredsType" USAGE="MONITORING">
<Label NLSID="hs_hostsamplecreds_credset">Monitoring Sample Credentials</Label>
<CredentialSetColumn TYPE_COLUMN="SampleCredUser" SET_COLUMN="sampleUser">
<Label NLSID="hs_hostsamplecreds_uname">Monitoring User Id</Label>
<CredentialSetColumn TYPE_COLUMN="SampleCredPassword" SET_COLUMN="samplePassword">
<Label NLSID="hs_hostsamplecreds_pwd">Monitoring Password</Label>
<CredentialSetColumn TYPE_COLUMN="SampleCredRole" SET_COLUMN="sampleRole">
<Label NLSID="hs_hostsamplecreds_role">Monitoring Role</Label>
Thanks for the reply. I wasn't quite sure what you meant by "refer to it in your query" but I just tried using the value like any other instance variable and it worked!
So in my QueryDescriptor where I used to define a Property element and set it to the value of an instance variable, I now just set it to the SET_COLUM value as you stated. I then pass this to my data collection script like normal.
<Property NAME="MY_PASSWORD" SCOPE="INSTANCE" OPTIONAL="FALSE">sampleUser</Property>
<Property NAME="script">myscript.pl %MY_PASSWORD%</Property>
Thanks again for the help,