summaryrefslogtreecommitdiffstats
path: root/src/journald
Commit message (Collapse)AuthorAgeFilesLines
* Add lmi_get_computer_system function and fix lmi_get_system_nameRadek Novacek2013-10-314-15/+15
| | | | | | | | | | | | | | PG_ComputerSystem has different method how to get hostname than our providers. In order to create the associations to this class we need to enumerate it. The downside is that all providers must supply CMPIContext to the lmi_init function. New function lmi_get_computer_system returns CMPIObjectPath to the configured CIM_ComputerSystem subclass instance. This object should be used in all references with ComputerSystem. Function lmi_get_system_name has been altered to return same value as ComputerSystem "Name" property.
* journald: Tweak and cleanup the MOF fileTomas Bzatek2013-10-251-0/+1
| | | | | | | A bit of cleanup, adding "Implemented(true)" qualifiers where applicable, adding forgotten properties used by the provider and also added and modified description for the methods we implement. Note that only modified descriptions have been added, the unchanged ones get inherited just fine.
* tests: use shared base class in provider testsMichal Minar2013-10-244-182/+18
| | | | Done for: Account, Journald and LogicalFile
* Fix some compilation warnings and coverity issuesRadek Novacek2013-10-222-2/+1
|
* Rework documentation.Jan Safranek2013-10-186-568/+0
| | | | | | | | | | - Everything is in openlmi-providers/doc/admin directory. - 'make doc' automatically builds documentation of all enabled providers. - Documentation shares one 'conf.py' for sphinx. - All documentation uses the same directory structure. There is only one CMakefile.txt to generate all the docs.
* journald: Add documentationTomas Bzatek2013-10-186-0/+568
|
* journald: Rename common test module to prevent conflictTomas Bzatek2013-10-184-3/+3
| | | | When running nosetest over all tests, modules having same name are not re-imported.
* journald: Adapt to recent global logging changesTomas Bzatek2013-10-157-4/+35
|
* journald: Add tests for new records writingTomas Bzatek2013-10-151-0/+43
|
* journald: Support writing new recordsTomas Bzatek2013-10-153-1/+142
| | | | | | | | | | | | | | | | | | | This change adds ability to report new messages in the journal log. This is done by the LMI_JournalLogRecord.CreateInstance() method call taking only CreationClassName, LogCreationClassName, LogName and DataFormat key properties as mandatory, with no need to specify the MessageTimestamp and RecordID key properties. The returned instance will contain all the information with actual RecordID key property of the new record. As long as sd_journal_send() actually only queues the request, we need to watch for journal changes in order to find the new record. This is quite unfortunate as the daemon could be busy and we can't wait forever. Messages are available immediately usually, a timeout is set to 5 seconds for the moment. Record matching is done by comparing the message itself, the origin function name and PID. This brings sufficient amount of confidence though more sophisticated approach may be needed in future to ensure full uniqueness.
* journald: Update tests to match modified message formatTomas Bzatek2013-10-151-1/+1
| | | | | The commit c7777bfa1b1114fd9d changed format of the message we expose to include process name and PID so let's update our tests accordingly.
* journald: Add iterator testsTomas Bzatek2013-10-153-1/+188
| | | | | | | Tests basic iterator operations, assumes accessible journal and several (> 10) records available. Also comes with a simple example script for downloading complete journal.
* journald: Add support for iteratorsTomas Bzatek2013-10-153-13/+462
| | | | | | | | | | | | | | | | | | | | | | | | | This implements CIM_MessageLog iterator functionality according to the model. The only limitation, or, let's say shortcoming, is a free-form output data format from the GetRecord call. Currently we feed the uint8 array with UTF-8 chars and it's up to the client to deal with it (as suggested in the model). This may be subject to change. Many methods are returning modified iterator that has been passed in and that allows having persistent iterators. As long as CIMOMs may destroy the instances and unload providers on inactivity, any particular delay would cause loss of the iterator. The iterator string contains journal cursor string, uniquely identifying a record. When this part of the iterator string is valid, the provider is able to reopen journal and seek to that position, allowing seamless continuation of the itearation process. If the cursor points to non-existing record, an error is returned. This typically happens when journal is rotated or the cursor is very old. The provider keeps track of active iterators during its lifetime, keeping the journal open for fast access. Clients are supposed to close the iterator by calling the CancelIteration method.
* journald: Include process name and PID in the messageTomas Bzatek2013-10-151-3/+28
| | | | Let's be consistent with traditional syslog message format.
* journald: Map the PRIORITY field to CIM_RecordForLog.PerceivedSeverityTomas Bzatek2013-10-151-0/+39
| | | | | | | | | | | | | | | Records in journal may contain syslog-style priority value so let's use them. Unfortunately mapping the particular values between syslog and CIM classes is not linear, manual mapping is needed. The LOG_ERR may also map to PerceivedSeverity = Major but it's kept on Minor for the moment. If no such information is provided by the Journal, the CIM property is left unset for the particular record. See e.g. http://schemas.dmtf.org/wbem/cim-html/2.34.0/CIM_RecordForLog.html for valuemap description.
* journald: Use lmi logging infrastructure for error messagesTomas Bzatek2013-10-156-11/+19
|
* journald: Add indicationsTomas Bzatek2013-10-158-0/+539
| | | | Also contains simple test suite to test indications.
* journald: Basic provider implementationTomas Bzatek2013-10-1510-0/+1155
This is a fully functional basic implementation of the provider. Maximum number of enumerated instances is limited, see the code. TODO list: https://fedorahosted.org/openlmi/ticket/142