Skip to main content
10-Marble
June 8, 2021
Solved

InfluxDB Configuration Settings

  • June 8, 2021
  • 1 reply
  • 2877 views

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

Best answer by slangley

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

 

 

1 reply

slangleyCommunity ManagerAnswer
Community Manager
June 9, 2021

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

 

 

10-Marble
June 9, 2021

Yes.  Thanks for the export/import info.  I exported the xml file.

  • Will it require an export specific to each major, or minor, version of TWX?
  • Can I strip out all the default value elements from the xml file?
  • Can I replace the encrypted password in the file, with a plain text password?
  • Can I import it with a REST API?
    • curl "http://$host/Thingworx/Importer?purpose=import&appKey=$APPKEY_ADMIN" -H "X-XSRF-TOKEN: TWX-XSRF-TOKEN-VALUE" -F "file=@InfluxPersistenceProvider.xml"

  • Is there a better option for a local cmd line import
    • One that doesn't require first creating an APPKEY via the UI?
    • Or can the REST API be used with credentials, rather than APPKEY, or does that also first require allowing it via the UI?

Thanks, Mike

 

10-Marble
June 11, 2021

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.