Replies: 1 comment
-
Hi @metabsd! I will respond in a bit different order from the one in the question. I hope things will still make sense ;)
No, but you can inspect the variables set on the inventory items by using the plugin: servicenow.itsm.now
table: cmdb_ci
columns:
- name
- ip_address
- fqdn
- install_status
- class You can then add the rest of the config options based on the results you get from the inventory command.
I am assuming that you are interested in getting your hands on the query string the inventory plugin sends to the backend. This information is not exposed to the users. But transforming plugin query to ServiceNow filter is not too complicated:
A few examples:
It is not possible to construct such a filter using the query parameter (queries do not support the OR operator because t is next to impossible to translate it to something that would look and function decently in the YAML world. But you can construct an equivalent query using the new query operator:
Examples I showed hint at how would one go about constructing such conditions.
For grouping items, you should use the keyed_groups:
- key: location
prefix: loc This will give you groups named like I hope this answer helped a bit ;) Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to use this module to gather several configuration items from the cmdb_ci table.
I would like to be able to gather several classes and then group by location.
I would like to know if I can see the original payload to be able to use the right filter criteria.
Is there any way to get the json generated by the module?
At the end I would like to be able to use this kind of filter.
sys_class_name=cmdb_ci_wap_network^ORsys_class_name=cmdb_ci_ip_router^ORsys_class_name=cmdb_ci_ip_switch^ORsys_class_name=u_cmdb_ci_caisse^ORsys_class_name=u_cmdb_ci_enregistreur_numeriq^install_statusIN1,101
Thank you very much for your help and especially for the good work you have done with this module.
Beta Was this translation helpful? Give feedback.
All reactions