-
Re: Want to update custom property of node by command or batch file
I LIKE EGGS May 20, 2017 1:13 PM (in response to krishna mishra)Hey, you have a few options here you can update a custom property as a trigger action based on an criteria and based on the output change your custom properties
Or you could you a SQL agent job
To update a value based on the where filter ( I personally use )
https://www.tutorialspoint.com/sql/sql-update-query.htm
Or you can use Orion SDK a mixture of swql and powershell that can run as a windows schedule
https://thwack.solarwinds.com/docs/DOC-187378
Could be some other ways but I like the second personally to update custom properties..
-
Re: Want to update custom property of node by command or batch file
d09hMay 22, 2017 8:29 AM (in response to krishna mishra)
Depending on how you intend to use these properties, you could consider using the same logic that you want to create in a batch file for the creation of a group in SolarWinds. You may want to experiment a little bit with creation of groups based on dynamic queries.
Potentially leveraging the native functionality of dynamic queries/ groups would make a batch file unnecessary. Removing the batch file and task scheduler pieces removes two possible points of failure (in my experience these were broken with regularity by system administrators hardening the NPM servers). And you may be able to achieve your desired outcome entirely from web interface, without the need to RDP to your poller. A dynamic query will update group membership automatically based on your group definition. This is the "auto update" functionality you described.
-
Re: Want to update custom property of node by command or batch file
chad.every May 22, 2017 9:36 AM (in response to krishna mishra)These are 2 Powershell scripts that I have used to update Custom Properties via the API. One for the Node and one for an Application
PowerShell script to modify a NODE Custom Property via Rest API/JSON
PowerShell script to modify an APPLICATION Custom Property via Rest API/JSON