Re: track the updates of CI's (845 Views)
Reply
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 1 of 14 (855 Views)
Accepted Solution

track the updates of CI's

HI Experts

I have requirement in SM7.11 where in my clients wants to track updates made in any field of a configuration item to be saved somewhere .  

We have around 10000 CI, we need to keep track of all the updates made to any of the fields of this 10000 CI .
EX

If i change serial no of a Ci its should be  saved that operator X has changed the value of serial.no of CI 10.
If i change HDD Size of a Ci its should be  saved that operator X has changed the value of hdd  of CI 25.

Regards
Praveen V

--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 2 of 14 (845 Views)

Re: track the updates of CI's

Hi

 

I am not using UCMDB .

 

I am manually loading the CI  and also i am not using any discovery to populate CIs and attributes

 

Regards

Praveen V

--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,685
Registered: ‎11-10-2008
Message 3 of 14 (842 Views)

Re: track the updates of CI's

Hello,

Basicly you can set an audit for the device table and track on all the requered fileds in it. Though the view of the result of Audit is not very nice. Try it and you will understand is this enough for you or not.

Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 4 of 14 (839 Views)

Re: track the updates of CI's

Hi Vadmin

Thanks for the reply , is there any other way of doing it other then audit has i have kept that has last option .

Also in SM 9.30 there is a fields by name Historical attribute changes , pending attribute changes what are those fields whether are they use to track if yes can we implement in 7.11

Regards
Praveen V
--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Honored Contributor
Piku
Posts: 3,908
Registered: ‎06-17-2010
Message 5 of 14 (834 Views)

Re: track the updates of CI's

Hi Praveen,

As Vadim suggest you have to go through audit or have to turn off audit.
You have to ensure that you do not need the audit records for CMDB.
It would be complicated as CMDB use join file.

http://h30499.www3.hp.com/t5/HP-Service-Manager-Service/Add-Activity-to-device-table/m-p/4778468#M53...


hth,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assign Kudo, if found post useful and mark it accepted if solves the issue.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,685
Registered: ‎11-10-2008
Message 6 of 14 (832 Views)

Re: track the updates of CI's

I don't know what will be easier to implement then the Audit.

 

Regarding SM 9.30 - I am not 100% sure but this should be  bind to the changes. Through changes you can approve or deny the change of parameters.  I am not 100% sure about that functionality.

Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 7 of 14 (824 Views)

Re: track the updates of CI's

Hi Piku

Thanks for sharing info , but i was not able to open the ZIP document in the solution , please can u share . Also if i implement audit i need to manually type all the fields condition to check .

Where in if i turn on audit i will get the details .

Regards
Praveen V
--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Honored Contributor
Jacob Heubner
Posts: 4,177
Registered: ‎07-21-2008
Message 8 of 14 (821 Views)

Re: track the updates of CI's

Thought I'd throw in my two cents here -

First, as has been said, using the audit table and auditspecs is the easiest way to track who updates which attributes at what time.  There's very little code involved.

 

 

The other fields you mentioned - the historic changes, pending attribute changes, etc - that is specifically for an integration with Change Management and the uCMDB.  When the uCMDB pushes data into Service Manager, it creates records in the dataModEvent table when an attribute's value in the uCMDB is different from that value in HPSM.  On Change records, users can perform a similar function and explicitly call out which attributes they are changing on a CI, and what the new values should be.  When the uCMDB push happens, the system validates these new values and updates the CI.  So unless you're planning to implement an integration with the uCMDB, that feature isn't going to help you much.

 

So, back to auditing.

There are two ways to set up auditing.  One is via a trigger record, and one is via a formatctrl record.  I forget how it's set up OOB and I no longer have easy access to an OOB 7.x system, so here's both ways.  Check which is set up, or use whichever you'd like.

 

On the formatctrl record for the CI type you're tracking, or on the 'device' master formatctrl record itself, in the subroutines section, there should be something like this:

Update: true

Before: false

Application: audit.compare

Names -

file

second.file

 

Values -

$file0

$file

 

The other way is through a trigger record.  Use Database Manager and search for the 'triggers' table.  On the device table (or the specific joinXXX table) make a record like this:

Trigger Name: after.update.device.audit

Table Name: device

Trigger Type: 4 - After Update

Application: trigger.invoke.auditor

 

Either one of those will trigger a call out to the RAD application involved with generating your audit records.  Once that is set up, you simply have to create an auditspec record for the table, listing out what are the fields to monitor.  Use Database Manager and search for the 'auditspec' table.  For example, to trigger an audit record for the joincomputer records to track changes to serial.no. and subtype, make a record like the following:

Filename: joincomputer

Unique A: logical.name

Field Name -

serial.no.

subtype

 

Once that is done, any time the record is saved, the system checks (either via formatctrl or trigger record) the auditspecs record for this file, and generates an audit record if the values in those fields have changed.

 

Please use plain text.
Honored Contributor
Jacob Heubner
Posts: 4,177
Registered: ‎07-21-2008
Message 9 of 14 (818 Views)

Re: track the updates of CI's

As Vadim stated, viewing the audit data isn't easy.  The format of the record list doesn't display everything you'd like it to, and you kind of have to dig to get the data you want.  So, I built a little something that makes it easier.

 

See attachment.  Comments and questions are welcome.

Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 10 of 14 (801 Views)

Re: track the updates of CI's

Hi Jacob

Thanks a lot for the attachment .
Cheers

Regards
Praveen V
--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 11 of 14 (795 Views)

Re: track the updates of CI's

Hi Jacob

I didnt get this part where to add this

Now, the script record -
Script Name: custom.viewAudit
Script Format: custom.viewAudit

Pretty simple - all it does is call and display the form specified.

The format is pretty simple too:
Form Name: custom.viewAudit
Form Element: HTML Viewer
Input: $uniqueA
HTML Generating Script: custom_AuditDump.FormatAudit

Please can u help me on this
Regards
Praveen V
--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 12 of 14 (791 Views)

Re: track the updates of CI's

Hi Jacob
It was so silly of me i got it . But after saving the form i am getting a n error

Script 'custom_AuditDump' line 12: ERROR TypeError: lib.htmlTemplates has no properties at char 1

Please can u help me out .

Regards
Praveen V
--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,685
Registered: ‎11-10-2008
Message 13 of 14 (787 Views)

Re: track the updates of CI's

Hello,

Very useful post from Jacob (as always).

 

In your case i suppose it might be the problem with the version of your system.

 

In your 7.x check if in ScriptLibrary (sl in command line) there is a record named htmlTemplates.

 

Anyway i will attach the file with the script from that sl

Please use plain text.
Respected Contributor
Praveen_V
Posts: 324
Registered: ‎10-11-2011
Message 14 of 14 (776 Views)

Re: track the updates of CI's

Hi Jacob/Vadim

 

Thanks a lot it worked .

 

Regards

Praveen V

--
Say " Cheers! " by clicking Kudos Star on the left .
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation