v6, DrvDsInfluxDB suport InfluxDB or InfluxDB2 or both ?

Forum Home Forums Understanding the Software v6, DrvDsInfluxDB suport InfluxDB or InfluxDB2 or both ?

Tagged: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11439
    zzz
    Participant

    Does DrvDsInfluxDB suport InfluxDB or InfluxDB2 or both ?

    #11440
    zzz
    Participant

    I am using InfluxDB2 local install, All I get from the log is “writing 0 data point”, why ?

    All channel data are of type Double, format Off-On.
    File Archive works fine, in webstation,
    I can open the channel’s minute data plot from table view.

    
    2022-10-27 14:10:00 Writing of 0 data points completed successfully in 84 ms
    2022-10-27 14:10:01 Successful response from the database server
    2022-10-27 14:11:00 Writing of 0 data points completed successfully in 1 ms
    2022-10-27 14:11:00 Successful response from the database server
    2022-10-27 14:12:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:12:00 Successful response from the database server
    2022-10-27 14:13:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:13:00 Successful response from the database server
    2022-10-27 14:14:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:14:01 Successful response from the database server
    2022-10-27 14:15:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:15:01 Successful response from the database server
    2022-10-27 14:16:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:16:00 Successful response from the database server
    2022-10-27 14:17:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:17:00 Successful response from the database server
    2022-10-27 14:18:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:18:00 Successful response from the database server
    2022-10-27 14:19:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:19:00 Successful response from the database server
    2022-10-27 14:20:00 Writing of 0 data points completed successfully in 0 ms
    2022-10-27 14:20:00 Successful response from the database server
    2022-10-27 14:21:00 Writing of 0 data points completed successfully in 0 ms
    
    #11441
    zzz
    Participant

    some more info
    from ScadaServer.txt

    
    2022-10-27 14:09:44 [wsta][appstack][ACT] Archive Cur initialized successfully
    2022-10-27 14:09:44 [wsta][appstack][ACT] Archive Min initialized successfully
    2022-10-27 14:09:44 [wsta][appstack][ACT] Archive Hour initialized successfully
    2022-10-27 14:09:44 [wsta][appstack][ACT] Archive Events initialized successfully
    2022-10-27 14:09:44 [wsta][appstack][ACT] Archive MinCopy initialized successfully
    2022-10-27 14:09:44 [wsta][appstack][ACT] Start listener on port 10000
    2022-10-27 14:09:44 [wsta][appstack][INF] Archive in DAT format: /app/appstack/rapidscada6/Linux/scada/Archive
    2022-10-27 14:09:44 [wsta][appstack][INF] Archive copy in DAT format: /app/appstack/rapidscada6/Linux/scada/ArchiveCopy
    2022-10-27 14:09:44 [wsta][appstack][ACT] Delete outdated data from the Min archive older than 27/10/2021
    2022-10-27 14:09:44 [wsta][appstack][ACT] Delete outdated data from the Hour archive older than 27/10/2021
    2022-10-27 14:09:44 [wsta][appstack][ACT] Delete outdated data from the Events archive older than 27/10/2021
    2022-10-27 14:09:46 [wsta][appstack][ACT] Session with ID 5923217496133782260 created
    2022-10-27 14:09:46 [wsta][appstack][ACT] Client 127.0.0.1 connected
    2022-10-27 14:09:46 [wsta][appstack][ACT] Session with ID -346220670448517208 created
    2022-10-27 14:09:46 [wsta][appstack][ACT] Client 127.0.0.1 connected
    2022-10-27 14:09:46 [wsta][appstack][ACT] User ScadaWeb is successfully authenticated
    2022-10-27 14:09:46 [wsta][appstack][ACT] User ScadaWeb is successfully authenticated
    

    from ScadaServer/Config/ScadaServerConfig.xml

    
    ...
      <Modules>
        <Module code="ModArcBasic" />
        <Module code="ModArcPostgreSql" />
        <Module code="ModArcInfluxDb" />
      </Modules>
      <Archives>
        <Archive active="true" 
                 code="Cur" 
                 name="Current data" 
                 kind="Current" 
                 module="ModArcBasic">
          <Option name="FlushPeriod" value="30" />
          <Option name="LogEnabled"  value="false" />
          <Option name="ReadOnly"    value="false" />
          <Option name="UseCopyDir"  value="false" />
        </Archive>
        <Archive active="true" 
                 code="Min" 
                 name="30s archive" 
                 kind="Historical" 
                 module="ModArcBasic">
          <Option name="IsPeriodic"   value="true" />
          <Option name="LogEnabled"   value="false" />
          <Option name="PullToPeriod" value="0" />
          <Option name="ReadOnly"     value="false" />
          <Option name="Retention"    value="365" />
          <Option name="UseCopyDir"   value="false" />
          <Option name="WriteWithPeriod"   value="true" />
          <Option name="WritingPeriod"     value="30" />
          <Option name="WritingPeriodUnit" value="Second" />
        </Archive>
        <Archive active="false" 
                 code="CurCopy" 
                 name="Current data copy" 
                 kind="Current" 
                 module="ModArcPostgreSql">
          <Option name="Connection"    value="" />
          <Option name="FlushPeriod"   value="30" />
          <Option name="LogEnabled"    value="false" />
          <Option name="MaxQueueSize"  value="1000" />
          <Option name="ReadOnly"      value="false" />
          <Option name="UseStorageConn" value="true" />
        </Archive>
    
        <Archive active="true" code="MinCopy" 
                 name="Minute archive copy" 
                 kind="Historical" 
                 module="ModArcInfluxDb">
          <Option name="Connection"     value="local-v2" />
          <Option name="IsPeriodic"     value="true" />
          <Option name="LogEnabled"     value="true" />
          <Option name="PullToPeriod"   value="0" />
          <Option name="ReadOnly"       value="false" />
          <Option name="Retention"      value="365" />
          <Option name="WriteWithPeriod"     value="true" />
          <Option name="WritingPeriod"  value="1" />
          <Option name="WritingPeriodUnit"   value="Minute" />
        </Archive>
    

    from ScadaServer/Config/ModArcInfluxDb.xml

    
    <ModArcInfluxDb>
      <Connections>
        <Connection>
          <Name>     local-v2</Name>
          <Url>      http://127.0.0.1:8086</Url>
          <Token>    %token%</Token>
          <Username> %user%</Username>
          <Password> %pass%</Password>
          <Bucket>   default</Bucket>
          <Org>      default</Org>
        </Connection>
      </Connections>
    </ModArcInfluxDb>
    
    #11448
    Mikhail
    Moderator

    InfluxDB2 is supported.
    In ScadaServer.txt there are statuses of archives. Is the MinCopy archive displayed as ready?

    In ScadaServer.log how many channels for archiving? For example
    Number of active channels for archiving: 271

    #11449
    Mikhail
    Moderator

    Writing of 0 data points completed successfully in 1 ms
    It looks like no channels are associated with the archive.

    #11461
    zzz
    Participant

    I am not exactly sure how that is supposed to be done.

    But in the helloworld project on a different box, it works correctly after I added connection setting and configured minute copy archive to use influxdb.

    And I can see below message in log now. I guess that mean it working.
    I will double check my previous instance setup after I regain access to the server.

    
    2022-10-30 16:05:30 Successful response from the database server
    2022-10-30 16:05:45 Writing of 8 data points completed successfully in 0 ms
    2022-10-30 16:05:45 Successful response from the database server
    2022-10-30 16:06:00 Writing of 8 data points completed successfully in 0 ms
    2022-10-30 16:06:00 Successful response from the database server
    

    I have some question, why not current data?
    What does read only option mean ?
    Can I disable file backends if I use influx?

    #11466
    Mikhail
    Moderator

    I guess that mean it working.

    Yes.

    I will double check my previous instance setup

    For testing, you can set Module to ModArcBasic for MinCopy.

    I have some question, why not current data?

    All InfluxDB points have timestamp.

    What does read only option mean ?

    This is kind of lifehack to read data from an archive that is written by another ScadaServer. This option ensures that the data is not affected.

    Can I disable file backends if I use influx?

    Yes. In this case I suggest to use ModArcInfluxDb for Cur, Min and Hour archives. Otherwise, Webstation settings should be updated.

    #11474
    zzz
    Participant

    Figured out, all channels’s archive mask needs to be updated in channel db.
    Issue closed.

    #11505
    zzz
    Participant

    What does read only option mean ?

    This is kind of lifehack to read data from an archive that is written by another ScadaServer. This option ensures that the data is not affected.

    You might want to have a look at the features like Continuous Query and Retention Policy . https://docs.influxdata.com/influxdb/v2.5/process-data/common-tasks/downsample-data/
    With that, the Flux’s aggregation methods become quite versatile and flexible, this can compensate the missing average aggregation from v6.

    I have some question, why not current data?

    All InfluxDB points have timestamp.

    I guess I just want to direct the collected data to influxdb as original as possible without oversampling, you know, e.g. pushing data that is not fresh but just because some configured interval has reached, since with influxdb’s window function can deal with unevenly paced data.

    • This reply was modified 1 year, 5 months ago by zzz.
    #11507
    Mikhail
    Moderator

    I guess I just want to direct the collected data to influxdb as original as possible without oversampling

    You could setup a historical archive to write data on change, defining minimum value change or period if needed.

    #11508
    Mikhail
    Moderator

    The read only option can be used to read from a bucket where downsampled data are written. Thank you for noticing.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.