Jeff Bjorness
2013-02-08 20:33:30 UTC
Jeff Bjorness [http://community.zenoss.org/people/jbjorness] created the discussion
"VMware guest reporting"
To view the discussion, visit: http://community.zenoss.org/message/71442#71442
--------------------------------------------------------------
Hello,
I'm trying to report the VMware guests to hosts relationship using the JSON API. I can query a VMware host in zenoss using getComponentTree which returns the components for the VMware host, however whenever I issue a getComponents query on the same VMware host it fails. Should I be able to get a list of all the components of a VMware host?
Thanks.
getComponents returns --
$VAR1 = {
         'success' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
         'msg' => 'AttributeError: info',
         'type' => 'exception'
       };
getComponentTree returns --
$VAR1 = [
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 9,
                       'text' => 'VMwareGuest',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareGuest',
           'id' => 'VMwareGuest',
           'leaf' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' )
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 46,
                       'text' => 'VMwareLun',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareLun',
           'id' => 'VMwareLun',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 14,
                       'text' => 'VMwareVCpu',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareVCpu',
           'id' => 'VMwareVCpu',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 10,
                       'text' => 'IpInterface',
                       'description' => 'components'
                     },
           'path' => 'Components/IpInterface',
           'id' => 'IpInterface',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 33,
                       'text' => 'VMwareHostVolume',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHostVolume',
           'id' => 'VMwareHostVolume',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 3,
                       'text' => 'VMwareHBA',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHBA',
           'id' => 'VMwareHBA',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 33,
                       'text' => 'VMwareHostVolumePartition',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHostVolumePartition',
           'id' => 'VMwareHostVolumePartition',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 2,
                       'text' => 'CPU',
                       'description' => 'components'
                     },
           'path' => 'Components/CPU',
           'id' => 'CPU',
           'leaf' => $VAR1->[0]{'leaf'}
         }
       ];

--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/71442#71442]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"VMware guest reporting"
To view the discussion, visit: http://community.zenoss.org/message/71442#71442
--------------------------------------------------------------
Hello,
I'm trying to report the VMware guests to hosts relationship using the JSON API. I can query a VMware host in zenoss using getComponentTree which returns the components for the VMware host, however whenever I issue a getComponents query on the same VMware host it fails. Should I be able to get a list of all the components of a VMware host?
Thanks.
getComponents returns --
$VAR1 = {
         'success' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),
         'msg' => 'AttributeError: info',
         'type' => 'exception'
       };
getComponentTree returns --
$VAR1 = [
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 9,
                       'text' => 'VMwareGuest',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareGuest',
           'id' => 'VMwareGuest',
           'leaf' => bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' )
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 46,
                       'text' => 'VMwareLun',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareLun',
           'id' => 'VMwareLun',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 14,
                       'text' => 'VMwareVCpu',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareVCpu',
           'id' => 'VMwareVCpu',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 10,
                       'text' => 'IpInterface',
                       'description' => 'components'
                     },
           'path' => 'Components/IpInterface',
           'id' => 'IpInterface',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 33,
                       'text' => 'VMwareHostVolume',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHostVolume',
           'id' => 'VMwareHostVolume',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 3,
                       'text' => 'VMwareHBA',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHBA',
           'id' => 'VMwareHBA',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 33,
                       'text' => 'VMwareHostVolumePartition',
                       'description' => 'components'
                     },
           'path' => 'Components/VMwareHostVolumePartition',
           'id' => 'VMwareHostVolumePartition',
           'leaf' => $VAR1->[0]{'leaf'}
         },
         {
           'iconCls' => 'tree-severity-icon-small-clear',
           'text' => {
                       'count' => 2,
                       'text' => 'CPU',
                       'description' => 'components'
                     },
           'path' => 'Components/CPU',
           'id' => 'CPU',
           'leaf' => $VAR1->[0]{'leaf'}
         }
       ];

--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/71442#71442]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]