Highlighted
Honored Contributor.
Honored Contributor.
224 views

REST API for /changeReports/generate/whitelist not using the viewName

API for this endpoint doesn't seem to use the view output, but rather the view output plus some related CIs.  Is that the desired output?  If so, it's not complete by any stretch.  My expectation would have been just the CIs outputed from the view.  In this case, just nodes.

Here's the POST:

{
"dateFrom": "1582512685000",
"dateTo": "1582685485000",
"viewName": "nodes_with_changes",
"attributes": ["bios_date", "block_size", "boot_processor_path", "configuration_file_path", "connection_url", "cpu_clock_speed", "dbuser_defaulttablespace", "ddf_tcp_port", "default_gateway_ip_address", "discovered_model", "discovered_os_name", "driver_date", "driver_version", "end_of_life_date", "firmware_version", "guid", "hacmpgroup_fallbackpolicy", "hacmpresource_start", "hardware_version", "host_last_boot_time", "hp_agent_version", "http_port", "installation_date", "installed_date", "is_versioning", "j2eecluster_clustername", "j2eedomain_activationtime", "jvm_osversion", "oracleapplication_version", "patch_level", "physical_cpus_available", "physical_network", "port_vlan", "serial_number", "software_version", "startup_time", "uri", "version", "description"]
}

nodes_with_changes only has a single node CIType in it.  The API returns what looks like some related CIs as well.

2020-02-25_22-09-08.png

Here's a formatted output:

['postgres.exe', 'process', '4a5aa37133b33b00a78ce4c99501478b', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['C:\\Windows', 'file_system_export', '48fc3d2a30ff0fe1baa7022d07df110d', 'description', '[Empty CMDB property value]', 'Remote Admin', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['C:\\Windows', 'file_system_export', '44e3fd25c4ffd24ba947ed1e3a1a71a6', 'description', '[Empty CMDB property value]', 'Remote Admin', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['Microsoft DNS Server (ad)', 'running_software', '48f19b84865e7c938badaf5da7b2cc43', 'version', '10.0.14393.3241', '10.0', 'Host Applications by Shell', '2020-02-24 14:53:48']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'default_gateway_ip_address', '[Empty CMDB property value]', '192.168.85.1', 'Host Connection by Shell', '2020-02-24 14:14:34']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'discovered_model', '[Empty CMDB property value]', 'Vmware7,1', 'Host Connection by Shell', '2020-02-24 11:43:07']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'discovered_os_name', '[Empty CMDB property value]', 'Windows 2016', 'Host Connection by Shell', '2020-02-24 11:43:07']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'host_last_boot_time', '[Empty CMDB property value]', 'Mon Feb 24 11:13:01 EST 2020', 'Host Connection by Shell', '2020-02-24 11:43:07']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'host_last_boot_time', 'Mon Feb 24 11:13:01 EST 2020', 'Mon Feb 24 17:39:06 EST 2020', 'Host Connection by Shell', '2020-02-25 11:39:59']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'bios_date', '[Empty CMDB property value]', 'Thu Aug 15 00:00:00 EDT 2019', 'Host Connection by Shell', '2020-02-24 11:43:07']
['ud', 'nt', '4f2793cacf8739ca8f6a08a2055f70b5', 'serial_number', '[Empty CMDB property value]', 'VMWARE-56 4D 37 50 81 81 9E 7A-20 22 DC B2 D7 28 68 22', 'Host Connection by Shell', '2020-02-24 14:14:34']
['postgres.exe', 'process', '4cae977ba7be8930bdd471178670b791', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '43cdb341eb2da4819e452a2e8cf524f3', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['C:\\Windows', 'file_system_export', '47a2f1dfc337c335832863f72e51bd12', 'description', '[Empty CMDB property value]', 'Remote Admin', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['postgres.exe', 'process', '4f4d923954d2b7fa984c25d670a41fd2', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['POSTGRES', 'postgresql', '4627e81fe49d5138b95b89b05d2cf83f', 'version', '9.6.15', '9.6.15.19261', 'Host Applications by WMI', '2020-02-25 09:12:45']
['POSTGRES', 'postgresql', '4627e81fe49d5138b95b89b05d2cf83f', 'version', '9.6.15.19261', '9.6.15', 'Host Applications by Shell', '2020-02-25 14:53:52']
['POSTGRES', 'postgresql', '43d2330532ce1eddb98efe29d3706b6a', 'version', '10.0.9.19175', '10.9', 'Host Applications by Shell', '2020-02-24 14:53:48']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '431ee6664669819690bf0dd24b4a46a1', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['postgres.exe', 'process', '44cfc711f8c5e86aa09a73858cb8058c', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '45e0a72edf36a84299f36e82e3ee836a', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['C:\\', 'file_system_export', '4eebd14554ac2ac39f449fc07c5d803a', 'description', '[Empty CMDB property value]', 'Default share', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['POSTGRES (ud)', 'postgresql', '4f17824e7fcfde2a803a6b508110f7a1', 'version', '10.0.9.19175', '10.9', 'Host Applications by Shell', '2020-02-24 15:37:46']
['POSTGRES (ud)', 'postgresql', '4f17824e7fcfde2a803a6b508110f7a1', 'version', '10.9', '10.0.9.19175', 'Host Applications by WMI', '2020-02-25 14:53:36']
['POSTGRES (ud)', 'postgresql', '4f17824e7fcfde2a803a6b508110f7a1', 'version', '10.0.9.19175', '10.9', 'Host Applications by Shell', '2020-02-25 14:53:52']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '4a9bff75458c293ab9fd8fe592f4c7fa', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['C:\\Windows\\SYSVOL\\sysvol', 'file_system_export', '41ea1c836e915b15a31eb059e2f1371d', 'description', '[Empty CMDB property value]', 'Logon server share', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['C:\\Windows', 'file_system_export', '40cdbdaaa86ae5119953f78beb6ca999', 'description', '[Empty CMDB property value]', 'Remote Admin', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'default_gateway_ip_address', '[Empty CMDB property value]', '192.168.85.1', 'Host Connection by WMI', '2020-02-24 14:34:36']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'discovered_model', '[Empty CMDB property value]', 'Vmware7,1', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'discovered_os_name', '[Empty CMDB property value]', 'Windows 2016', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'host_last_boot_time', '[Empty CMDB property value]', 'Mon Feb 24 09:18:19 EST 2020', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'bios_date', '[Empty CMDB property value]', 'Thu Aug 15 00:00:00 EDT 2019', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ad', 'nt', '4a17e47eb031a207a264ded40b527e6b', 'serial_number', '[Empty CMDB property value]', 'VMWARE-56 4D 10 BC BB 67 76 C4-FE 7B 28 0F 05 9D 85 A1', 'Host Connection by WMI', '2020-02-24 14:34:36']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '41ceb30c3c2d5e0ab378723cd1311890', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['E:\\', 'file_system_export', '44eb94bbd49f828e9d44c62492f3ed13', 'description', '[Empty CMDB property value]', 'Default share', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['postgres.exe', 'process', '407c62c1608a91b8b2debae43e67883d', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '4850929b1262d0b480f1fe098e411745', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '401e7f0423f22aebae24c82c0deee806', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '407afcc9b3bd8079a522ddcbf07b0708', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['postgres.exe', 'process', '4ffc32ac533336e6bdf1fe0d0ea1b406', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '4285f19da8662b54ba7a4f3258bb363f', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['postgres.exe', 'process', '4cac74b68925e8d19de147dfc5893909', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'default_gateway_ip_address', '[Empty CMDB property value]', '192.168.85.1', 'Host Connection by WMI', '2020-02-24 14:34:36']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'discovered_model', '[Empty CMDB property value]', 'Vmware7,1', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'discovered_os_name', '[Empty CMDB property value]', 'Windows 2016', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'host_last_boot_time', '[Empty CMDB property value]', 'Mon Feb 24 08:42:59 EST 2020', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'description', 'cookies', 'milk', 'User:sysadmin', '2020-02-25 21:38:54']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'description', 'milk', 'juice', 'User:sysadmin', '2020-02-25 21:39:46']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'description', 'juice', 'coffee', 'User:sysadmin', '2020-02-25 21:53:04']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'bios_date', '[Empty CMDB property value]', 'Thu Aug 15 00:00:00 EDT 2019', 'Host Connection by WMI', '2020-02-24 11:44:51']
['ucmdb', 'nt', '48ff0073532cba14b7dc86b58961ccb6', 'serial_number', '[Empty CMDB property value]', 'VMWARE-56 4D 7F B0 F1 BC E4 E1-69 99 2D 44 F4 C0 0A 89', 'Host Connection by WMI', '2020-02-24 14:34:36']
['postgres.exe', 'process', '4076bbbd1fdd5fb6a5bbe3d95a2c9ab9', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '43d646b162c566b4a78458dc0f7e4475', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '4c28e0cdab87599c83f68bf1c764f214', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '49adb3a13eb8ae9186aa1553aca2b318', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['C:\\', 'file_system_export', '465f974db74b0bb78a8968c6dbe6a82c', 'description', '[Empty CMDB property value]', 'Default share', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '4fd2c24846f06d84b4492c7a563c9b23', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '457e2b8366e27d35bfb14af9013c577d', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '45ee68b0fd0a7cfc86ff51be581041f2', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '43ad2bf2402bdc099bb37a1913d8a1ac', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
2']
['postgres.exe', 'process', '44880719d1694abe90711347cae1b982', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '4286c2108f7ae6e9808414eea07efd95', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['postgres.exe', 'process', '4d80f1d18d9f7e38a587683f80678184', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['C:\\', 'file_system_export', '4817cac1ad88f3629c28a421ecf2a7f0', 'description', '[Empty CMDB property value]', 'Default share', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['obm', 'nt', '4cca764356035cfbae3e926a356f519e', 'default_gateway_ip_address', '[Empty CMDB property value]', '192.168.85.1', 'Host Connection by WMI', '2020-02-25 09:07:38']
['obm', 'nt', '4cca764356035cfbae3e926a356f519e', 'discovered_os_name', '[Empty CMDB property value]', 'Windows 2016', 'Host Connection by WMI', '2020-02-25 09:07:38']
['obm', 'nt', '4cca764356035cfbae3e926a356f519e', 'host_last_boot_time', '[Empty CMDB property value]', 'Mon Feb 17 15:10:01 EST 2020', 'Host Connection by WMI', '2020-02-25 09:07:38']
['obm', 'nt', '4cca764356035cfbae3e926a356f519e', 'bios_date', '[Empty CMDB property value]', 'Thu Aug 15 00:00:00 EDT 2019', 'Host Connection by WMI', '2020-02-25 09:07:38']
['obm', 'nt', '4cca764356035cfbae3e926a356f519e', 'serial_number', '[Empty CMDB property value]', 'VMWARE-56 4D 68 2B 12 FA DB 37-D4 58 CA CA 4C DF E8 01', 'Host Connection by WMI', '2020-02-25 09:07:38']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '41474ce183a56378aad30716aa8eacca', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['C:\\Windows\\SYSVOL\\sysvol\\wisdevgru.com\\SCRIPTS', 'file_system_export', '419d5437e08adb97ad99656e766c919b', 'description', '[Empty CMDB property value]', 'Logon server share', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz', 'cpu', '4fb7be75749edf72b87bc936dfef1567', 'cpu_clock_speed', '2300', '2197', 'Inventory Discovery by Scanner', '2020-02-25 16:44:41']
['C:\\', 'file_system_export', '4919b613135a65739d0968fd307dada3', 'description', '[Empty CMDB property value]', 'Default share', 'Inventory Discovery by Scanner', '2020-02-25 16:42:51']
['postgres.exe', 'process', '49f2e2fa2da755bc859669512b52a83a', 'description', '[Empty CMDB property value]', 'PostgreSQL Server', 'Host Applications by WMI', '2020-02-25 14:53:36']
['Micro Focus UCMDB Server', 'running_software', '46425237b00f293184cb663f9b1e436a', 'version', '[Empty CMDB property value]', '11.6.0', 'Host Applications by Shell', '2020-02-24 14:53:48']

Labels (4)
0 Likes
6 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: REST API for /changeReports/generate/whitelist not using the viewName

if the query has only the node defined, then why do you query for attributes which are not part of the Node class: cpu_clock_speed, j2eedomain_activationtime, etc?

 

Likes are appreciated!
Highlighted
Honored Contributor.
Honored Contributor.

Re: REST API for /changeReports/generate/whitelist not using the viewName

Fair question @popadiyski .  The app that I'm working on supports user definable viewNames, so for now I'm trying to understand why the endpoint is returning more data than what's defined in the view.  The attribute list is also user definable, and was provided by the customer.

The first use case is nodes, but the second will move up to InfrastructureElement, thus the large attribute list. 

So, from a development perspective, I'm taking incremental steps, and a super simple view was step one. 

Any ideas why the endpoint is returning more data?  It's odd because it's only returning a few additional types when there are many more types not included. 

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: REST API for /changeReports/generate/whitelist not using the viewName

@Alex Ulbrich I can confirm your finding. I've created the same query, executed the same statement and even though that the query contains only nodes, I've received a change report on Inventory Scanner CI. "history.queries.log" shows a quite bigger activity from what should be as it is described in  the rest query:

Generates change report exclusively on the given attributes of the given CIs,generates a report that contains information just about the attributes written in list "attributes".

 

I've tried to find out what is the logic behind  the extension of history events, but I couldn't see anything specific in the logs. I can see that even dbtables are checked for changes, even though there is no direct connection to Node. In fact the DB Table is 3rd level CI from the node: unix -> mysql-> MySql database -> DB Table.

This current behavior is excessive and the process will definitely struggle when more data is available. I suggest you to open a case about that.

Petko

Likes are appreciated!
Highlighted
Honored Contributor.
Honored Contributor.

Re: REST API for /changeReports/generate/whitelist not using the viewName

@popadiyski , thank you so much for validating!  I'll get a case opened.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: REST API for /changeReports/generate/whitelist not using the viewName

Quick question - obviously I have no ability to check or confirm, so I'm wondering if you can look.  Is there any chance the data you're getting back are the "autoComplete" CI types?  That is, the related CI types that are included in the identification rule for Node?  Does this behavior stop if you turn "autoComplete" off (which I would not recommend under normal circumstances)

 

Highlighted
Honored Contributor.
Honored Contributor.

Re: REST API for /changeReports/generate/whitelist not using the viewName

@Bill_Dyck , good idea, however, the CIs returned are not in the identification rule.  

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.