diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2014-05-26 16:43:51 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2014-05-26 16:46:30 +0200 |
commit | 0439544be0df390dbee795181282cc04a7aef4cd (patch) | |
tree | 394493f9ed543558114b848f00f98fbd1cee1065 | |
parent | fd4fd29e0c6b5dd0c52b2b2f4558f2159b9fb1aa (diff) | |
download | openlmi-providers-0439544be0df390dbee795181282cc04a7aef4cd.tar.gz openlmi-providers-0439544be0df390dbee795181282cc04a7aef4cd.tar.xz openlmi-providers-0439544be0df390dbee795181282cc04a7aef4cd.zip |
journald: Add static indication filters
This commit brings three basic static indication filters that should
make user's life easier. Also serves as an example.
-rw-r--r-- | mof/70_LMI_JournaldIndicationFilters.mof | 67 | ||||
-rw-r--r-- | mof/CMakeLists.txt | 4 |
2 files changed, 70 insertions, 1 deletions
diff --git a/mof/70_LMI_JournaldIndicationFilters.mof b/mof/70_LMI_JournaldIndicationFilters.mof new file mode 100644 index 0000000..5f03b76 --- /dev/null +++ b/mof/70_LMI_JournaldIndicationFilters.mof @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2012-2014 Red Hat, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Authors: Tomas Bzatek <tbzatek@redhat.com> + * + * These are static CIM_IndicationFilter instances used by journald + * providers. They should be installed upon providers installation. + * They should go to root/interop namespace for sfcb and root/PG_Interop + * for pegasus. + */ + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_JournalLogRecord:NewMessage"; + Query = "SELECT * FROM LMI_JournalLogRecordInstanceCreationIndication WHERE " + "SourceInstance ISA LMI_JournalLogRecord"; + /* CIM: prefix required for pegasus */ + QueryLanguage = "CIM:CQL"; + Description = "Basic journald event filter."; + /* required for sfcb - but deprecated */ + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_JournalLogRecord:NewErrorMessage"; + Query = "SELECT * FROM LMI_JournalLogRecordInstanceCreationIndication WHERE " + "SourceInstance ISA LMI_JournalLogRecord AND " + "SourceInstance.LMI_JournalLogRecord::SyslogSeverity < 4"; + QueryLanguage = "CIM:CQL"; + Description = "New message event for error messages logged in journal."; + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_JournalLogRecord:NewCriticalMessage"; + Query = "SELECT * FROM LMI_JournalLogRecordInstanceCreationIndication WHERE " + "SourceInstance ISA LMI_JournalLogRecord AND " + "SourceInstance.LMI_JournalLogRecord::SyslogSeverity < 3"; + QueryLanguage = "CIM:CQL"; + Description = "New message event for critical messages logged in journal."; + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; diff --git a/mof/CMakeLists.txt b/mof/CMakeLists.txt index 0c020a1..cbc971b 100644 --- a/mof/CMakeLists.txt +++ b/mof/CMakeLists.txt @@ -46,6 +46,8 @@ if (WITH-SOFTWARE) endif (WITH-SOFTWARE) if (WITH-JOURNALD) - install(FILES 60_LMI_Journald.mof DESTINATION share/openlmi-providers/) + install(FILES 60_LMI_Journald.mof + 70_LMI_JournaldIndicationFilters.mof + DESTINATION share/openlmi-providers/) endif (WITH-JOURNALD) |