Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Can ThingWorx 9.1 be setup to use InfluxDB without using the UI? The documentation only shows the UI, and I can find no references on the web to specifying InfluxDB provider info in platform-settings.json.
My goal is to create an automated install process.
Thanks, Mike
Solved! Go to Solution.
Hi Mike.
We assume you realize that you can automate pieces of the InfluxDB setup--creation of the db, etc. If you have any questions about this process, please refer to the ThingWorx Help Center. The actual InfluxDB persistence provider is not configured in platform-settings.json since it is not a requirement for ThingWorx to run. But you could generate an export and then automate the import it into your other systems. Here's a Help Center page to provide some guidance.
Regards.
--Sharon
Hi Mike.
We assume you realize that you can automate pieces of the InfluxDB setup--creation of the db, etc. If you have any questions about this process, please refer to the ThingWorx Help Center. The actual InfluxDB persistence provider is not configured in platform-settings.json since it is not a requirement for ThingWorx to run. But you could generate an export and then automate the import it into your other systems. Here's a Help Center page to provide some guidance.
Regards.
--Sharon
Yes. Thanks for the export/import info. I exported the xml file.
curl "http://$host/Thingworx/Importer?purpose=import&appKey=$APPKEY_ADMIN" -H "X-XSRF-TOKEN: TWX-XSRF-TOKEN-VALUE" -F "file=@InfluxPersistenceProvider.xml"
Thanks, Mike
I was able to import the xml from the cmd line without first creating an APPKEY.
I had to remove the plaintext password. With the password value, the import failed because it could not connect to the influx database.
I verified that it sill worked when I removed the two ConfigurationTables of default values. Exporting after importing the stripped down version produced essentially the same export file.
Hi @MikeMurray
Using the Universal Export option, should resolve these issues.
If you have further questions, please let us know.
Regards.
--Sharon
Hi @MikeMurray
To answer your questions:
1) You most likely won't need separate exports for each minor version. It's difficult to predict regarding major versions since we don't know what changes may be introduced in the future.
2) Not clear why you would need to strip out the default value elements if you're trying to automate your setup. Maybe we're not understanding something.
3) If you select Universal export, the password will be decrypted in the export file
4) Yes, you can import using REST.
5) For security reasons, you must either have an appKey or credentials that also exist in ThingWorx
Regards.
--Sharon
Thank you! Changing this allowed the import to succeed with a plaintext password.
universal="password"
I wanted to stripped out the default stuff because I created a template xml with variables that are replaced when the automation runs to provision a new server. That reduces the clutter in the managed file, leaving the default determination to the import process, which should make it less likely to break as ThingWorx changes.
Thanks, Mike