classify/assign events to tenants/customers
Hi, I'm looking for a way to "classify"/assign events to tenants/customers. A tenant/customer can be all events belonging to host or a combination of host/program. I thought patterndb can help doing this. However it seems there is no way? * classification: pattern is per program and limited to the message * correlation: context is limited to one host not many Do I miss something, or are there even better ways? Thanks, Sascha. Aufsichtsratsvorsitzender: Herbert Vogel Geschäftsführung: Michael Krüger Sitz der Gesellschaft: Halle/Saale Registergericht: Amtsgericht Stendal | Handelsregister-Nr. HRB 208414 UST-ID-Nr. DE 158253683 Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Empfänger sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail oder des Inhalts dieser Mail sind nicht gestattet. Diese Kommunikation per E-Mail ist nicht gegen den Zugriff durch Dritte geschützt. Die GISA GmbH haftet ausdrücklich nicht für den Inhalt und die Vollständigkeit von E-Mails und den gegebenenfalls daraus entstehenden Schaden. Sollte trotz der bestehenden Viren-Schutzprogramme durch diese E-Mail ein Virus in Ihr System gelangen, so haftet die GISA GmbH - soweit gesetzlich zulässig - nicht für die hieraus entstehenden Schäden.
Hi Sascha, On Thu, Sep 18, 2014 at 06:53:04AM +0000, Lucas, Sascha wrote:
* classification: pattern is per program and limited to the message
patterndb's "primary keys" are indeed (currently) limited to PROGRAM (rulesets) and MESSAGE (patterns), although you can easily bypass that limitation.
* correlation: context is limited to one host not many
You *can* correlate messages from different hosts by using 'context-scope = global' in the rule
Well, that isn't exactly true. We do what the OP is asking for. We have a database where we specify who is responsible for a host, and then for each program on that host, who is responsible. Then we make a pattern database from the responsibility database that has entries that look like <rule id="{hostname}-{program}" class="business" provider="UVic"> <patterns> <pattern>{hostname}:{program}:</pattern> </patterns> <tags> <tag>group_development</tag> </tags> <values> <value name="group">development</value> </values> </rule> So there is an entry for EVERY host:program combination, and as piece of metadata is assigned via the tag value pair for group=group_name. Don't worry about the size of this database. Ours is 162017 lines long today. This pattern database is accessed via the syslog-ng configuration below. Note that we also have the ability to change the responsibility group based on weekday name and hour of day, but that may not be needed in your environment. template t_business { template("$HOST:$PROGRAM:$S_WEEK_ABBREV:$HOUR"); template_escape(no); }; parser p_business { db_parser( file("/opt/flare/etc/business.xml") inject_mode(internal) template(t_business) ); }; filter f_development { tags("group_development"); }' filter f_developments { match('^development$' value("group") type(pcre) ); }; log { sourc(your_source); parser(p_business); log { filter(f_development); destination(d_development_file); flags(final); }; log { filter(f_production); destination(d_production_file); flags(final); }; }; Hope that gives you the building blocks you need. Evan. On 09/18/2014 06:25 AM, Fabien Wernli wrote:
Hi Sascha,
On Thu, Sep 18, 2014 at 06:53:04AM +0000, Lucas, Sascha wrote:
* classification: pattern is per program and limited to the message
patterndb's "primary keys" are indeed (currently) limited to PROGRAM (rulesets) and MESSAGE (patterns), although you can easily bypass that limitation.
* correlation: context is limited to one host not many
You *can* correlate messages from different hosts by using 'context-scope = global' in the rule
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
-- Evan Rempel erempel@uvic.ca Senior Systems Administrator 250.721.7691 Data Centre Services, University Systems, University of Victoria
Hi Evan,
Hope that gives you the building blocks you need.
It did. Thank you very much. Sascha. Aufsichtsratsvorsitzender: Herbert Vogel Geschäftsführung: Michael Krüger Sitz der Gesellschaft: Halle/Saale Registergericht: Amtsgericht Stendal | Handelsregister-Nr. HRB 208414 UST-ID-Nr. DE 158253683 Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Empfänger sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail oder des Inhalts dieser Mail sind nicht gestattet. Diese Kommunikation per E-Mail ist nicht gegen den Zugriff durch Dritte geschützt. Die GISA GmbH haftet ausdrücklich nicht für den Inhalt und die Vollständigkeit von E-Mails und den gegebenenfalls daraus entstehenden Schaden. Sollte trotz der bestehenden Viren-Schutzprogramme durch diese E-Mail ein Virus in Ihr System gelangen, so haftet die GISA GmbH - soweit gesetzlich zulässig - nicht für die hieraus entstehenden Schäden.
participants (3)
-
Evan Rempel
-
Fabien Wernli
-
Lucas, Sascha