modify_collection_schedule
Modifies the collection schedule of a collection setup for metrics and policies for the specified set of targets. Combining all the metrics, running a script, and collecting the data is referred to as a collection. The collection has various attributes associated with it, such as the collection schedule, upload frequency, and so forth.
Format
emcli modify_collection_schedule -targetType=ttype -targetNames=tname1;tname2;tname3... -collectionName=collname [-collectionStatus=Enabled or Disabled] [-freqType={Minute}{Hour}{Day}{Week}{Weekly}{Month} [-freqValue={any integer value for Minute/Hour/Day/Week}{One or more from Mon...Sun for Weekly}{One or more from 1;2..31 or Last for Month} [-preview=Y or N] [ ] indicates that the parameter is optional { } indicates that you can select one of the s in the series shown Note: All of the parameters and choices are case-insensitive
Options
-
targetType
You must specify a single target type value, and it should be the same as specified in the repository.
Note:
Only individual target types are currently supported.
-
targetNames
The target name should be the same as exists in the repository. All of the targets should be the same target type you specified in the targetType parameter. Use a semicolon ( ; ) to separate the names. Changes to the collection schedule will be executed for only valid target name and target type combinations. For example:
host1;host2;host3
-
collectionName
The collection name should be exactly the same as exists in the repository or the corresponding collections .xml file present on the Management Agent.
Access files from the following locations to determine the collection to be modified. Select the desired collection and provide it as input to the EM CLI utility.
-
$AGENT_HOME/sysman/admin/metadata/<targetType>.xml
This file is shipped as a part of the setup and contains information regarding the metrics for this target type.
-
$AGENT_HOME/sysman/admin/default_collection/ <targetType>.xml
This file is shipped as a part of the setup and contains the collections shipped by default.
-
$AGENT_HOME/sysman/emd/collection/ <targetType_targetName>.xml
Whenever changes have occurred for any particular target, this file is automatically generated. Collections for user-defined metrics are available in this file.
-
-
collectionStatus
Enables or disables the collection. The default is Enabled. If Disabled, freqType and freqValue are ignored.
-
freqType
You can specify one of the following values:
Minute (default) Hour Day Week Weekly Month
For Week, you must specify an integer value as the frequency value. For instance, if you specify freqType='WEEK' and freqValue='2', the collection occurs every two weeks.
For Weekly, the possible values are Mon, Tue, Wed, Thu, Fri, Sat, Sun. For instance, if you specify freqType='Weekly' and freqValue='Tue;Thu;Sun', the collection occurs every Tuesday, Thursday, and Sunday of a week.
The schedule is modified based on your selection. You do not need to specify a value (and the value will be ignored) if the collectionStatus parameter is set to Disabled.
If you use this option, you must also use the freqValue parameter.
-
freqValue
You can specify one of the following values:
-
You must specify an integer value if the freqType is any one of Minute, Hour, Day, or Week. The default value is 5.
-
For Weekly, specify one or more choices from Mon, Tue, Wed, Thu, Fri, Sat, and Sun. If the collection occurs on any particular day(s) of the week, you must specify the corresponding value(s) against the Weekly option.
-
For Monthly, specify one or more choices from 1...31 or Last. If the collection occurs on any particular date(s) in a month, you must specify the corresponding value(s) against the Monthly option.
You do not need to specify a value (and the value will be ignored) if the collectionStatus parameter is set to Disabled.
If you use this option, you must also use the freqType parameter.
-
-
preview
Provides a preview of the changes that would occur if this verb is executed. The default value for this option is Y (Yes), whether you specify the option or not. If you specify N, the changes to the collection schedule are executed for both the repository and Management Agent.
Examples
Example 1
This example changes the collection schedule to collect once every 5 minutes for hosts host1, host2, and host3. DiskActivity is a collection item associated with a host target type. The preview flag is set to Y, so the changes are not executed, but you can see the metrics affected if the changes were implemented.
emcli modify_collection_schedule -targetType="host" -targetNames="host1;host2;host3" -collectionName="DiskActivity" -freqType="Minute" -freqValue="5" -preview="Y"
Example 2
This example changes the collection schedule to collect once every 15 hours for host host1. Inventory is a collection item associated with a host target type. The preview flag is set to N, so the changes are executed for the associated metrics for both the repository and Management Agent.
emcli modify_collection_schedule -targetType="host" -targetNames="host1" -collectionName="Inventory" -freqType="Hour" -freqValue="15" -preview="N"