Skip to content
Snippets Groups Projects
Commit 595061ce authored by Jakub Cegan's avatar Jakub Cegan
Browse files

Merge branch 'master' of homeproj.cesnet.cz:warden

parents ddccf8bf cc407f7d
No related branches found
No related tags found
No related merge requests found
#RECEIVER configuration file
[GENERAL]
# Where will be received events stored [stdout,file,db]
method="stdout","file","db"
# Path to Warden client
wardenpath="/opt/warden-client"
# Type of event which will be requested. To get all types of event, leave this option blank.
requested_type=
[FILE]
# Where will be received results stored
directory="/root/warden/src/warden-app/var/fileout/"
# How we will handle files
# append - one file named by 'appendfilename' param,
# newfile - new file for every client's call in dd-mm-yyyy_hh_mm ended by 'extension' param
method="append"
# Name of file when method 'append' will be chosen
appendfilename="warden-received"
# Extension of file when method 'newfile' or 'append' will be chosen
extension="csv"
[DB]
# Database engine in which will be received events stored
dbengine="sqlite"
#!/bin/bash
USER=$1
DB=$2
if [ $# -ne 2 ]; then
echo "Usage: $0 username dbname"
exit -1
fi
# create table events
echo "CREATE TABLE \`events\` (
\`id\` int(11) NOT NULL AUTO_INCREMENT,
\`hostname\` varchar(256) DEFAULT NULL,
\`service\` varchar(64) DEFAULT NULL,
\`detected\` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
\`type\` varchar(64) DEFAULT NULL,
\`source_type\` varchar(64) DEFAULT NULL,
\`source\` varchar(256) DEFAULT NULL,
\`target_proto\` varchar(16) DEFAULT NULL,
\`target_port\` int(2) DEFAULT NULL,
\`attack_scale\` int(4) DEFAULT NULL,
\`note\` text,
\`priority\` int(1) DEFAULT NULL,
\`timeout\` int(2) DEFAULT NULL,
PRIMARY KEY (\`id\`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;" | mysql -u$USER -p $DB
exit 0
#!/bin/bash
db_file=$1
if [ $# -ne 1 ]; then
echo "Usage: $0 dbfile"
exit -1
fi
# create table events
sqlite3 $db_file "CREATE TABLE events (id INTEGER, hostname VARCHAR(256), service VARCHAR(64), detected TIMESTAMP, type VARCHAR(64), source_type VARCHAR(64), source VARCHAR(256), target_proto VARCHAR(16), target_port INT(2), attack_scale INT(4), note TEXT, priority INT(1), timeout INT(2));"
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment