Custom application discovery not populating in the database

Document ID : KB000105819
Last Modified Date : 09/07/2018
Show Technical Document Details
Question:
I have created a custom application script for grouping of machines based on a service, along with the needed mcs profile, and the attributes are published to those machines that have the roles but when running the following I am not seeing the systems attributes updated:

select * from CM_COMPUTER_SYSTEM cs join CM_COMPUTER_SYSTEM_ATTR a on a.cs_id=cs.cs_id where a.cs_attr_key like 'UserProp%.Roles';
  
Answer:
Run your script from the command line on one of the targets that has the resource:

The script needs to output something like this:

C:\Program Files (x86)\Nimsoft\plugins\attr_publisher\custom_scripts>app_disco_bit9.bat
Roles=R7Agent_MsgBus

C:\Program Files (x86)\Nimsoft\plugins\attr_publisher\custom_scripts>

Note the carriage return after the output. There needs to be a carriage return on the end of the last line of your script so that it outputs as above. If your output looks like following it will not update the niscache files as it should:

C:\Program Files (x86)\Nimsoft\plugins\attr_publisher\custom_scripts>app_disco_bit9.bat
Roles=R7Agent_MsgBus
C:\Program Files (x86)\Nimsoft\plugins\attr_publisher\custom_scripts>