I am trying to build a simple curl script to update bigfix with Solarwinds node number so that i can later use the node number to issue commands to put monitoring in maintenance mode, etc.
The curl command will use the client IP and Name to try to match a pre-existing registered client on the orion server.
I really have issues trying to parse in action script, give me sed and awk any day.
I am looking to just get the ### and nothing else out of the return so i can use it to set a client setting for a node for future reference.
I’ve not tested this, but what about something like:
setting "NodeID"="{preceding text of first "}" of following text of last ":" of lines of file "R:\curloutput.txt"}" on "{parameter "action issue date" of action}" for client
I was able to get this working however can you provide a hint on how to collect the curl output from stdout and have it in a parameter? and then parse the parameter with the jsons function?
It would be nice to not have the file i/o even if it is short lived on the clients.
I’m not sure you’d be able to avoid file i/o in that case. Relevance evaluation is handled separately from the file execution, so you wouldn’t be able to capture the process output directly into a parameter.