Custom Logs: Difference between revisions

125 bytes removed ,  10:11, 16 October 2023
m
Line 4: Line 4:
   |}
   |}
In CMX version 3.22.0 - b3211 the Custom Logs were introduced, providing the possibility for the user to create their own logfiles for any value - also strings - which CMX produces in a [[Webtags|webtag]]. This called for a procedure in CumulusUtils to handle those logs. In version 6.21.0 this was realised. This [[Custom Logs]] procedure is based on the External Sensors.
In CMX version 3.22.0 - b3211 the Custom Logs were introduced, providing the possibility for the user to create their own logfiles for any value - also strings - which CMX produces in a [[Webtags|webtag]]. This called for a procedure in CumulusUtils to handle those logs. In version 6.21.0 this was realised. This [[Custom Logs]] procedure is based on the External Sensors.
=== Goal ===
The CustomLogs module's goal is to chart webtags and display its current realtime value in a table left of the chart.


=== '''IMPORTANT''' ===
=== '''IMPORTANT''' ===
'''NOTE: The formatting of the datafiles is important as the Custom Logs are basically free format: you can put into the file any text and numbers with any separator you wish. CUtils will NOT handle that Free Format in general. The user has to take care the information in the resulting datafiles is as follows:'''
'''NOTE: The formatting of the datafiles is important as the Custom Logs are basically free format: you can put into the file any text and numbers with any separator you wish. CUtils will NOT handle that Free Format in general. The user has to take care the information in the resulting datafiles is as follows:'''
  '''1) There MUST be at least one space of your local separator between the webtags; '''
  '''1) There MUST be at least one space or your local separator between the webtags; '''
  '''2) There cannot be any plain text in the logfile'''
  '''2) There cannot be any plain text in the logfile'''
  '''3) The date/time must be untouched i.e. the format is the local date format e.g. dd-mm-yy;hh:mm;'''
  '''3) The date/time must be untouched i.e. the format is the local date format e.g. dd-mm-yy;hh:mm;'''


If there is free  text in the definition of the log, the CustomLogs module should ignore that and parse only the webtags which result in a number.
If there is free  text in the definition of the log, the CustomLogs module will ignore that and parse only the webtags which result in a number.
Strange effects may occur if this is not obeyed.


'''NOTE: Be aware that for every webtag an entry in the datafile will be created for the period of number of hours you have defined for the charts. This may lead to large datafiles being transferred every interval, data duplication (data already present in the standard datafiles of CMX or CUtils) and high memory use and performance of your server while displaying the charts may be the result. So the user is warned to think about what he really wants to log and view.
'''NOTE: Be aware that for every webtag an entry in the JSON datafile will be created for the period of number of hours you have defined for the charts. This may lead to large datafiles being transferred every interval, data duplication (data already present in the standard datafiles of CMX or CUtils) and high memory use and performance of your server while displaying the charts may be the result. So the user is warned to think about what he really wants to log and view.
'''
'''
'''NOTE: If you use PHP upload: If you change your CustomLogs definition such that you get a 500 error in while uploading the datafile, please delete the datafile on the server and let the system try again.'''


'''NOTE: Webtag values are the actual momentane values when asked at CMX. Be aware that a webtag value is NEVER an average of the period before it. That is also not the case for the DAILY values where it would maybe be kind of natural to expect such value. A better name for Daily in this case would be the ''Midnight value''.'''
'''NOTE: Webtag values are the actual momentane values when asked at CMX. Be aware that a webtag value is NEVER an average of the period before it. That is also not the case for the DAILY values where it would maybe be kind of natural to expect such value. A better name for Daily in this case would be the ''Midnight value''.'''