cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

InfluxDB Configuration Settings

MikeMurray
10-Marble

InfluxDB Configuration Settings

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

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:MikeMurray)

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

 

 

View solution in original post

6 REPLIES 6
slangley
23-Emerald II
(To:MikeMurray)

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.

  • 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

 

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.

slangley
23-Emerald II
(To:MikeMurray)

Hi @MikeMurray 

 

Using the Universal Export option, should resolve these issues.

 

If you have further questions, please let us know.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:MikeMurray)

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
export.PNG

 

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

 

Announcements


Top Tags