Active IQ Unified Manager Discussions

Operations Manager Importing

brycedeutsche
4,495 Views

Hi - I have added a custom field called Cost Centre on user objects for recharging purposes.

Can anyone tell me if I can import this information into OM for the relevant user objects via the DFM command line in the same way we input the email addresses with the mailmap option?

Any ideas immediately tested!!

1 ACCEPTED SOLUTION

raja
4,495 Views

Ops Manager does not have a bulk loading option for custom comment fields.

But you can use the 'dfm comment set' cli and create a script to perform bulk load (i presume you want to set the comment field for user objects in OM):

STEP 1 - Export the list of users

$ dfm report -q -F csv users | awk -F "," '{ print $2 }' > users.csv

STEP 2 - Edit the csv file to add a second column which is the cost center. The file should look like:

root,1001

wheel,2001

STEP 3 - Set comment fields in OM (replacing <comment-name> with the name of the comment field you have created)

$ cat users.csv | awk -F "," '{ system("dfm comment set " $1 " <comment-name>=" $2) }'

STEP 4 - Verify the values are entered

$ dfm report users-comments

View solution in original post

2 REPLIES 2

raja
4,496 Views

Ops Manager does not have a bulk loading option for custom comment fields.

But you can use the 'dfm comment set' cli and create a script to perform bulk load (i presume you want to set the comment field for user objects in OM):

STEP 1 - Export the list of users

$ dfm report -q -F csv users | awk -F "," '{ print $2 }' > users.csv

STEP 2 - Edit the csv file to add a second column which is the cost center. The file should look like:

root,1001

wheel,2001

STEP 3 - Set comment fields in OM (replacing <comment-name> with the name of the comment field you have created)

$ cat users.csv | awk -F "," '{ system("dfm comment set " $1 " <comment-name>=" $2) }'

STEP 4 - Verify the values are entered

$ dfm report users-comments

brycedeutsche
4,495 Views

Raja - excellent, thanks This has provided so much functionality for reporting on business specific information within OM

The command we have added to our script which imports the mailmap is;

dfm comment set DOMAIN\+userid+ "Cost Code"=TESTCOST

Using Windows hosts

Public