lgcheckd.state.db

Package: WA2L/edrc 1.5.57
Section: File Formats (4)
Updated: 25 August 2024
Index Return to Main Contents

 

NAME

state.db - lgcheckd database state.db

 

SYNOPSIS

edrc/var/logcheckd/state/state.db

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

The state.db is the database that contains all volatile information of the log check daemon lgcheckd(1m).

 

FILEFORMAT

This is the ER (Entity Relationship) diagram of the state.db SQLite database that is used to store all log monitoring data of the log check daemon lgcheckd(1m).

The [PK] field is the primary key, 1---n is a 'one to any' relationship.

All primary keys are unique in this data model.

      .-----------.
      | state     |
      |-----------|
      | key  [PK] |
      | value     |
      `-----------'
 
      .-----------.       .-------------.
      | collect   |       | counter     |       .----------.
      |-----------|       |-------------|       | logfile  |
  .--1| run  [PK] |1-----n| collect_run |       |----------|
  |   | begin     |       | logfile_id  |n-----1| id  [PK] |1--.
  |   | end       |       | level       |       | filename |   |
  |   `-----------'       | count       |       `----------'   |
  |                       `-------------'                      |
  |                                                            |
  |                       .-------------.                      |
  |                       | match       |                      |
  |                       |-------------|                      |
  `----------------------n| collect_run |                      |
                          | logfile_id  |n---------------------'
                          | timestamp   |
                          | level       |
                          | message     |
                          `-------------'

state
this table contains state information of the lgcheckd.

collect
in this table the collect run properties are kept. Only one run is active, which is represented by an empty end field.

Collect run entries are never deleted.

logfile
the logfile table contains an index of all log files ever monitored.

counter
here all counts for matching patterns for each [LEVEL] are saved. Counters are never deleted.

match
here the matching log file message data (except data of [EXCLUDE] sections and IGNORED messages) are saved. When a report is created (using -a report) the collected data of the related collection run is deleted by default.

The data collection can be disabled using the COLLECT=False setting in the daemon configuration file or using the -a nocollect option on the command line.

Data collection is automatically suspended when the available storage on the filesystem where the state.db resides gets tight. A suspended collection is automatically resumed after sufficient storage is available, again.

If data collection is disabled or suspended the matches are still counted and saved to the counter table.

 

OPTIONS

-

 

FILES

lib/logcheckd/database/state.ddl
SQL file to generate the SQLite database.

var/logcheckd/state/state.db
SQLite main database file.

var/logcheckd/state/state.db-wal
this file is the Write-Ahead Log. It temporarily stores the changes made to the database. When a transaction is committed, the changes are appended to the wal file. Eventually, these changes are transferred (checkpointed) from the wal file back into the main database file.

var/logcheckd/state/state.db-shm
this file is the Shared Memory File. It is used to coordinate access between multiple database connections in WAL mode. The shared memory file is used to store the index of transactions in the wal file and to handle concurrency control.

 

EXAMPLES

-

 

SEE ALSO

edrcintro(1), lgcheckd(1m), lgcheckd.cfg(4), logcheckd.cfg(4), logcheckd.pattern(4), sqlite(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

state.db was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2024 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FILEFORMAT
OPTIONS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 15:06:30 GMT, December 05, 2024