In this Slack discussion from ControlUp, a user asked about the availability of custom fields in EdgeDX. Another user mentioned the meta_string_1 through 3 fields which can be populated by running scripts on the endpoint. A sample script was shared by a member and it was suggested to use JSON format when writing to these fields. The discussion also includes a link to the ControlUp support page for scripting and creating custom indexes.
Read the entire ‘ControlUp EdgeDX: Custom Fields and Populating Meta_Strings’ thread below:
one more thing, sorry these are all different questions: any custom fields available to write to in EdgeDX?
maybe related to above, but I see meta_string_1 through 3 that look blank today. can I write to this with the API?
meta_string_1string
A generic field allowing for bespoke customer-specific device information.
meta_string_2string
A generic field allowing for bespoke customer-specific device information.
meta_string_3string
A generic field allowing for bespoke customer-specific device information.
going to try this today
you can create custom indexes not custom metrics that show n the machine see https://support.controlup.com/docs/scripting-guide
Those 3 fields are special. There are scripts you can run on the endpoint that will populate those fields. I’ll see if I can dig a sample up but @member would surely have them.
The important part here is $department. I’ll simplify it. Replace YourContentGoesHere with whatever you want to go into the field. Line 8.
$token = Get-Content ‘C:\ProgramData\Avacee\sip_agent\cachefiles\DeviceAccessToken.txt’
$tokenHeader = $token.Substring(4)
$tenantfromRegistry = Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Avacee\SIP -Name tenant
$tenantname = "$tenantfromRegistry"
[hashtable]$headers = @{}
$headers.Add(‘x-access-token’, $token)
$body = @{}
$body.Add(‘meta_string_1’, "YourContentGoesHere")
Fails if not converted to JSON first
$jsnBody = $body | ConvertTo-Json -Depth 100
$uri = "https://$tenantname/api/device/update"
Invoke-RestMethod -Uri $Uri -Method POST -Headers $headers -Body $jsnBody -ContentType ‘application/json’
😄
yeah I just copy/pasted an existing use case
Know that one well, lol
thank you guys!
Continue reading and comment on the thread ‘ControlUp EdgeDX: Custom Fields and Populating Meta_Strings’. Not a member? Join Here!
Categories: All Archives, ControlUp Edge DX, ControlUp Scripts & Triggers