Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#75 Logging redundancy

Next_Release
open
Sam Lin
Logging (3)
4
2006-02-09
2005-10-18
Joao Matos
No

Hello,

I would like to suggest some redundancy for SQL
logging, using a local text file (eg. events.txt) for
logging all the events until the SQL is active again.
At that time HM would replicate all the locally
recorded events to the SQL.

Best regards,

Joao Matos

Discussion

  • Sam Lin
    Sam Lin
    2006-02-09

    Logged In: YES
    user_id=1051658

    Thanks Joao Matos's suggestion.

    I'd like to take care this task.
    I'll do as below step.

    1. Add a DLL Project LogRedundancy" into HealthMonitor
    Solution. (I'll use C#) with follwing Methods.
    1.1 Log Check Data into XML files. Named as CheckDisk.xml,
    CheckCPU, ... and so on.
    1.2 Checking DB connection status when Timer triggered.
    (This will depends on DBLogging.dll)
    1.3 Transmit Exist xml data when Timer triggered and DB
    connection well. (Also depends on DBLogging.dll)
    1.4 Flush exist xml files.

    2. Modify the CheckTemplate GUI add a CheckBox
    control "Logging redundancy" into FrmConfigure.vb, and
    then doing following rules.
    2.1 If "Logging redundancy" is Disable, do the same
    procedure as well.
    2.2 If "Logging redundancy" is Enable, each time Timer
    triggered, check the DB connection first.
    2.2.1 If DB connection is ok, do the Method 1.3 and 1.4
    2.2.2 If DB connection is fail, do as well as 2.1

    3. Modify the Exist Plugins to add "Logging redundancy"
    feature.

    Sam Lin

     
  • Sam Lin
    Sam Lin
    2006-02-09

    Logged In: YES
    user_id=1051658

    Sorry for logical mistake, I modify the rules.

    2.2.1 If DB connection is ok, do the Method 1.3 and 1.4
    ---> Do 1.3, 1.4 first, then doing 2.1
    2.2.2 If DB connection is fail, do as well as 2.1
    ---> Do 1.1 first, then doing 2.1 or don't send data to DB
    this time by addding a bealean condition.

     
    • priority: 5 --> 4
    • assigned_to: nobody --> samlin
     
  • Logged In: YES
    user_id=809959

    I prefer to have logging redundancy configuration at top
    level not at check level, adding a CheckBox
    control "Logging redundancy"into DBLogging Form.

    Moreover about the redundancy logic:
    1) I don't think we need only to check the connection, the
    error could depend on write permissions, wrong DB name...
    2) The redundancy procedure can be called (if it's enabled)
    only when the log2db procedure fails and write something to
    a queue
    3) A timer in the HM Service will check the queue (if
    redundancy is enabled) and if something is found, it try to
    write to DB

    It's not mandatory, it's only my idea about it, what do you
    think about ?

     
  • Sam Lin
    Sam Lin
    2006-02-09

    Logged In: YES
    user_id=1051658

    You are right. I'll follow your logic.

     
  • Sam Lin
    Sam Lin
    2006-03-14

    Logged In: YES
    user_id=1051658

    I'v test on MSSQL for Log Redundancy, please feed back
    about MDB or MySql testing status or any suggestion.
    Thanks.

    Attached files:
    1. Change log for Log Redundancy.
    2. Interface Project.
    3. DBLogging Project.

     
  • Sam Lin
    Sam Lin
    2006-03-14

    Logged In: YES
    user_id=1051658

    I cannot upload files. I'll send the files to Project
    Admin.

     
  • Logged In: YES
    user_id=809959

    I think you could also upload to CVS, however thanks for
    your works !

    Vittorio

     
  • Sam Lin
    Sam Lin
    2006-03-15

    Logged In: YES
    user_id=1051658

    I found a Bug.

    When the Log DataSet become too large, it will eat memory
    resource.

    I'll add some code to disable log redundancy flag.