Chris,

Thanks for the info. I've managed to get "BMC_Impact" relationships working
- not sure what I was doing before, but it's working a treat now!

The theory is that when an asset (CI) is added to an incident, an outage on
that CI potentially has a downstream impact. By using CMDBGraphQuery, you
can find all the "Impact" relationships, and add these CI's to the incident.
Of course, they won't all necessarily be impacted, so the workflow is set up
to flag these as "potentials".

Thanks again,

Matt

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Williams
Sent: Tuesday, 11 July 2006 6:28 PM
To: [email protected]
Subject: Re: CMDBGraphQuery issues

Hi Matt,
  I'm afraid I can only offer you a very limited piece of information based
upon the
"playing" I've done with the Graph Query command from osdriver (I'm running
CMDB
1.1 unpatched at the moment, but working on upgrading to 2.0)
I have no real need to make use of it anywhere at this stage, so I've only
done a
few tests for my own curiosity.
I've executed the following script in osdriver which does return results for
me
without an error:

#START
grq
<My InstanceId of a Computer System Here>
BMC
BMC_ComputerSystem

1
BMC
BMC_ComputerSystem

1
BMC
BMC_Component
0
0
BMC
BMC_ComputerSystem

0
0
-1
0
T
T
#END

It's a while ago since I looked at this, so can't remember what I was trying
to
achieve withi this, but thought that it may be of some use to you.
I'm wondering if the API is somehow upset with some of the aliases you've
specified
for the classes...just a guess.

On a side note, have you looked into the functionality provided by the CI
Relationship Viewer provided with CMDB 2.0? Depending on what you're doing,
this may
be of interest.

HTH
Chris.

> Hi all,
>
>
>
> I'm currently trying without success to get the CMDBGraphQuery function
> call, (using c on CMDB 1.1) to work. I haven't seen much on the list on
this
> topic - in fact, I only found one entry - Dan, back in 2005 you asked if
> anyone had used it. I didn't find any responses. As far as documentation
> goes, all I've been able to get my hands on is the graph query white
paper,
> and the CMDB api guide.
>
>
>
> I am currently testing our requirement against the cmdb driver (i.e.
> osdriver) program. The driver program is running on a linux (fedora core
4)
> platform, and the database being queried is running on win 2003.
>
>
>
> First, a brief description of what we require:
>
>
>
> Given a specific CI (configuration item), traverse the CMDB tree, finding
> all CI's (regardless of class) where a relationship of type "Impact" has
> been defined. Once this list has been returned, a number of records will
be
> created in another form on the system.
>
>
>
> In running the driver program, I am starting with a CI that is known to
> exist (see attached output from the "gi" get instance driver command).
When
> running the graph query (grq) command, I am supplying namespace, class,
> instance id, etc. as prompted. However, I am not entirely sure that I am
> supplying the correct information. Assuming that I can construct a graph
to
> represent what I want to achieve, I'm still not entirely certain how to
> represent this within the querygraph structure. After supplying all
required
> information, I am receiving an error 120036:
>
>
>
> 120036
>
> Error
>
> The specified query graph does not have a starting node.
>
> (AROS_ERROR_QUERY_GRAPH_HAS_NO_STARTNODE)
>
> Specify starting node information in the query graph.
>
>
>
>
>
> Please see the attached output from the grq command.
>
>
>
> What I require:
>
>
>
> 1 - What am I doing wrong to get the "120036" error? I think I'm supplying
> the correct namespace, class and instance id.
>
> 2 - What else am I doing wrong, understanding the requirement? In other
> words, what should my responses to the grq command look like?
>
> 3 - Is the cmdbGraphQuery command actually able to do what we require? Our
> requirement is to traverse the tree, finding matching relationships, but
> where the class could be any class
>
> 4 - I would appreciate any sample code where the querygraph structure is
> being populated. I can derive this from the api guide, and also from the
> example in the driver program, but if there is any other example code in
use
> to do a cmdbGraphQuery call, I would love to see it.
>
>
>
> I would be grateful for any feedback from any c or java gurus out there
who
> have successfully implemented this function call.
>
> Many thanks,
>
> Matt Willis
> * +61 410 471 901
> * [EMAIL PROTECTED]
>
>
>
>
>
____________________________________________________________________________
___
> UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org
>


-- 

Chris Williams

Tel:+44 (0) 7769 657855
Mailto:[EMAIL PROTECTED]

This message is for the designated recipient only and may contain
privileged,
proprietary, or otherwise private information. If you have received it in
error, please notify the sender immediately and delete the original. Any
other
use of the email by you is prohibited.

____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

Reply via email to