Browse files

Much more useful index for log stored in sqlite

  • Loading branch information...
Nicolas DUPEUX
Nicolas DUPEUX committed May 7, 2012
1 parent e6530a2 commit ca1435c2d3511e91f9c3abe066398b6ebbc3f058
Showing with 1 addition and 1 deletion.
  1. +1 −1 shinken/modules/
@@ -167,7 +167,7 @@ def prepare_log_db_table(self):
# 'options', 'plugin_output', 'service_description', 'state', 'state_type', 'time', 'type',
cmd = "CREATE TABLE IF NOT EXISTS logs(logobject INT, attempt INT, class INT, command_name VARCHAR(64), comment VARCHAR(256), contact_name VARCHAR(64), host_name VARCHAR(64), lineno INT, message VARCHAR(512), options VARCHAR(512), plugin_output VARCHAR(256), service_description VARCHAR(64), state INT, state_type VARCHAR(10), time INT, type VARCHAR(64))"
- cmd = "CREATE INDEX IF NOT EXISTS logs_time ON logs (time)"
+ cmd = "CREATE INDEX IF NOT EXISTS logs_host_name ON logs (host_name)"
cmd = "PRAGMA journal_mode=truncate"

0 comments on commit ca1435c

Please sign in to comment.