Category:Cumulus MX: Difference between revisions

2,879 bytes added ,  08:50, 30 June 2020
m
Line 89: Line 89:
= Installing and Running Cumulus MX =
= Installing and Running Cumulus MX =


== Installing ==
== Executables ==


There is no automatic installer (this may change). Cumulus MX is supplied as a zipped package on a link from [[software|Software page]].
There is no automatic installer (this may change). Cumulus MX is supplied as a zipped package on a link from [[software|Software page]].
Line 101: Line 101:
=== ExportMySQL.exe ===
=== ExportMySQL.exe ===


This second exe file in the package. Run with <tt>ExportMySql.exe daily</tt> or '''sudo mono ExportMySql.exe daily''' depending on device; will populate a newly created database table to hold daily summary values with past rows taken from [[Dayfile.txt]]. Replace "dayfile" with "monthly" in the run instruction for this exe to update all rows in a newly created table to hold values from all the [[standard log files]].
This is second exe file in the package. It will read log files and insert rows into an existing database table. Since it only does inserts, despite the name of this function, it is not just for MySQL tables, it should work with whatever database type you have.  


The executable has a mandatory single parameter that tells it which log files to read.
==== Daily summary log file ====
# Use the feature in the admin interface:
#* Settings menu
#* MySQL settings page
#* In '''Dayfile.txt upload''' section, give your database table a name, or accept default ''Dayfile''.
#* Click '''Save''' to ensure this setting is updated
# Now scroll down to '''Create database table (save settings first)'''
#* Here click '''Create Dayfile'''
# Now you have a database table ready, you can use the executable to read all lines in your '''CumulusMX/data/dayfile.txt''' log file.
# Open a terminal display (if you are using Windows then, open a Command Window, a Windows Powershell window, or a Windows Terminal window)
# Run this executable in that terminal display (or command window) by using  '''sudo mono ExportMySql.exe daily''' or <tt>ExportMySql.exe daily</tt> depending on device.
# In the terminal display (or command window) you will see '''Parameter = daily''' confirming what you entered and in the line below that a rapidly updating code that is the primary key displayed for each row it tries to insert into the table.  If that primary key already exists in the table, it will still show the key, but no insert will take place.
#If you want MX to continue adding new rows to this database table, still in the admin interface, still in MySQL settings page:
#* Return to '''Dayfile.txt upload''' section, and select '''Enable'''.
==== Standard Log files ====
# Use the feature in the admin interface:
#* Settings menu
#* MySQL settings page
#* In '''Monthly log file upload''' section, give your database table a name, or accept default ''Monthly''.
#* Click '''Save''' to ensure this setting is updated
# Now scroll down to '''Create database table (save settings first)'''
#* Here click '''Create Monthly'''
# Now you have a database table ready, you can use the executable to read all lines in every standard log file it can find in your data folder (it looks for files with the right pattern of date and text in the folder).
# Open a terminal display (if you are using Windows then, open a Command Window, a Windows Powershell window, or a Windows Terminal window)
# Run this executable in that terminal display (or command window) by using  '''sudo mono ExportMySql.exemonthly''' or <tt>ExportMySql.exe daily</tt> depending on device.
# In the terminal display (or command window) you will see '''Parameter = monthly''' confirming what you entered and in the line below that a rapidly updating code that is the primary key displayed for each row it tries to insert into the table.  If that primary key already exists in the table, it will still show the key, but no insert will take place.  So you can run this again to pick up any additions to the latest log file since the original run.
#If you want MX to continue adding new rows to this database table, still in the admin interface, still in MySQL settings page:
#* Return to '''Monthly log file upload''' section, and select '''Enable'''.


== Completely new MX installation ==
== Completely new MX installation ==
5,838

edits