summaryrefslogtreecommitdiffstats
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* added new testing module imdiagRainer Gerhards2009-05-251-52/+195
| | | | | which enables to talk to the rsyslog core at runtime. The current implementation is only a beginning, but can be expanded over time
* added capability to run multiple tcp listeners (on different ports)Rainer Gerhards2009-05-225-24/+32
| | | | | | | | | | | Well, actually this and a lot of related things. I improved the testbench so that the new capabilities are automatically tested and also did some general cleanup. The current multiple tcp listener solution will probably receive some further cleanup, too, but looks quite OK so far. I also reviewed the way tcpsrv et all work, in preparation of using this code for imdiag. I need to document the findings, especially as the code is rather complicated "thanks" to the combination of plain tcp and gssapi transport modes.
* made imdiag *just* compile & some cleanupRainer Gerhards2009-05-201-16/+20
| | | | | | imdiag was never finished (not even really begun), but now I need it. I made the few things that are available compile, but more serious work is required.
* Make it recover from errors on insertions.Luis Fernando Muñoz Mejías2009-04-291-5/+4
| | | | | | | | | If the database rejected some entry, making the statement fail on it, the batch was not cleaned and the same values were retried over and over, causing a cascade of failures and a denial of service. We use now OCI_BATCH_ERRORS so that everything valid in the batch is inserted, and rejected values can be discarded.
* Replace get_db_statement by a template.Luis Fernando Muñoz Mejías2009-04-291-25/+13
| | | | | | | | | | | | | Instead of reading a complete line, we'll use a template and delegate in the core to read such template. Then, all omoracle has to do is to find that template and use it as the prepared statement. I'm not sure if this is the correct approach, though. It has to dig too much into rsyslog's structures... txt_statement is stored in a private area, so that we don't mess too much with rsyslog's internals (I still don't feel comfortable with this much digging into template structures).
* Add the $OmoracleBatchItemSize directiveLuis Fernando Muñoz Mejías2009-04-291-17/+29
| | | | | | | | | | | | | | | | This directive controls the amount of memory needed for properties in the batch. Users should specify the largest value they expect in the statement. As per Rainer's comment: on MAX_BUFSIZE: I'd tend to make this configurable, because with RFC5424 messages can be much longer and RFC5425 now recommends a minimum maximum size of 8K. So we let users to choose. Maybe we need a sensible default value to make users' lifes easier? Also, the old non-vector based interface is not supported anymore. I broke it already when moving to this stage.
* Add licensing information.Luis Fernando Muñoz Mejías2009-04-292-0/+10
| | | | | I'm not sure if GPLv3 contemplates the ability to link to proprietary software, if it was previous work. I explicitly allow linking to OCI.
* some cleanupRainer Gerhards2009-04-172-2/+1
| | | | | ... mostly removal of compile-time warnings (thanks to Michael Biebl for suggesting to look after that)
* update project status & cleanupRainer Gerhards2009-04-172-22/+24
| | | | | | removed some warning in imklog compilation, but may not have solved a lurking issue (but placed comment so that we know if something surfaces)
* Merge branch 'master' into nextmasterRainer Gerhards2009-04-171-9/+41
|\
| * Merge branch 'beta'Rainer Gerhards2009-04-171-9/+41
| |\
| | * Merge branch 'v3-stable' into betaRainer Gerhards2009-04-171-9/+41
| | |\
| | | * Merge branch 'debian_lenny' into v3-stableRainer Gerhards2009-04-171-9/+41
| | | |\
| | | | * Merge branch 'v2-stable' into debian_lennyRainer Gerhards2009-04-171-9/+41
| | | | |\
| | | | | * bugfix: ompgsql did not detect problems in sql command executionRainer Gerhards2009-04-171-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this could cause loss of messages. The handling was correct if the connection broke, but not if there was a problem with statement execution. The most probable case for such a case would be invalid sql inside the template, and this is now much easier to diagnose.
| | | | * | Merge branch 'v2-stable' into debian_lennyRainer Gerhards2008-12-181-2/+2
| | | | |\|
| | | | * | backport of $AllowedSender security fixv3.18.6Rainer Gerhards2008-12-083-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - security bugfix: $AllowedSender was not honored, all senders were permitted instead (see http://www.rsyslog.com/Article322.phtml) (backport from v3-stable, v3.20.9) - minor bugfix: dual close() call on tcp session closure
* | | | | | Merge branch 'nextmaster' into oracleRainer Gerhards2009-04-165-139/+367
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/rsyslog.h
| * \ \ \ \ \ Merge branch 'omprog' into nextmasterRainer Gerhards2009-04-144-138/+365
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog runtime/rsyslog.h
| | * | | | | | improved omprog, now ready for first practical testingRainer Gerhards2009-04-011-8/+161
| | | | | | | |
| | * | | | | | initial work on omprog, an output module to send messages to another programRainer Gerhards2009-04-013-19/+93
| | | | | | | |
| * | | | | | | fixed compile-time problems in im3195Rainer Gerhards2009-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... however, I did not not a test run due to the lack of existing test drivers and the very low (aka "non-existing" interest from the userbase in the feature).
* | | | | | | | added a new error code for too-old rsyslog coreRainer Gerhards2009-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which can be emittend when plugin can not load due to missing core functionality.
* | | | | | | | Fixing the batch insertions.Luis Fernando Muñoz Mejías2009-04-161-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous versions inserted garbage (the pointer was interpreted as the string itself). It seems inserting arrays of strings is not that easy with OCI. This approach consumes 2KB per entry in the batch, so if you have batches of size 1000 you'll be using 2MB for the batch. This size doesn't change, anyways and the risk of leaking memory is gone. OCI doesn't deal well with batches of strings. :(
* | | | | | | | Add the callback for OCIBindDynamic.Luis Fernando Muñoz Mejías2009-04-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's hope it works.
* | | | | | | | Add some debugging outputLuis Fernando Muñoz Mejías2009-04-161-0/+1
| | | | | | | |
* | | | | | | | Make the counting of bind parameters aware of literals.Luis Fernando Muñoz Mejías2009-04-161-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Literal strings passed in the statement may contain ':', let's not count them.
* | | | | | | | Fixed a mem leakLuis Fernando Muñoz Mejías2009-04-161-0/+1
| | | | | | | |
* | | | | | | | Convert to the array-based interface.Luis Fernando Muñoz Mejías2009-04-162-41/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll receive a single statement to be prepared and a batch size. Then, doAction will execute the statement only once per batch hit, making the process much more efficient. This will reduce network and DB server overhead. The downside is that this version cannot be used with rsyslog v3 anymore. If anyone is interested on backporting the module, they should choose all patches up to this one. Better documentation may follow.
* | | | | | | | Merge branch 'nextmaster' into oracleRainer Gerhards2009-04-091-0/+1
|\| | | | | | |
| * | | | | | | Merge branch 'master' into nextmasterRainer Gerhards2009-04-091-0/+1
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog
| | * | | | | | Merge branch 'beta'Rainer Gerhards2009-04-091-0/+1
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog tcpsrv.c tcpsrv.h Note: we have a slight inconsistency, as interface version v4 was already used for tcpsrv in this branch. We accept this inconsistency.
| | | * | | | | Merge branch 'v3-stable' into betaRainer Gerhards2009-04-091-0/+1
| | | |\ \ \ \ \ | | | | | |/ / / | | | | |/| | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog
| | | | * | | | bugfix: $InputTCPMaxSessions config directive was accepted, but not honoredRainer Gerhards2009-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resulted in a fixed upper limit of 200 connections.
* | | | | | | | Stop omoracle losing messages on rsyslog shutdown.Luis Fernando Muñoz Mejías2009-04-091-23/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rsyslog shuts down, we must send and commit any pending messages or information will be lost. It will make rsyslog's shut down slower, but also more reliable.
* | | | | | | | Solve a memory leak when freeing Oracle instances.Luis Fernando Muñoz Mejías2009-04-091-1/+0
| | | | | | | |
* | | | | | | | Make it work in batches of statements.Luis Fernando Muñoz Mejías2009-04-091-11/+60
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all statements to be executed are stored on the same structure. When the batch size is reached, all statements are executed in a single transaction, and then committed. There are many corner cases in which an error may happen and the batch may be left in an inconsistent state, perhaps leaking memory or crashing. They will be fixed.
* | | | | | | Merge branch 'oracle' into nextmasterRainer Gerhards2009-04-084-0/+378
|\ \ \ \ \ \ \
| * | | | | | | Merge branch 'nextmaster' into oracleRainer Gerhards2009-04-071-0/+2
| |\| | | | | |
| * | | | | | | Merge branch 'master' into oracleRainer Gerhards2009-04-032-3/+79
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into oracleRainer Gerhards2009-04-024-0/+271
| |\ \ \ \ \ \ \ \ | | | |_|_|_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.am
| * | | | | | | | some small changes (as suggestion)Rainer Gerhards2009-04-011-8/+6
| | | | | | | | |
| * | | | | | | | Convert the module configuration to $Action... directives.Luis Fernando Muñoz Mejías2009-04-011-23/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the old-style configuration parameters, use $... directives, which lead to simpler code, and also should make user's configurations simpler. Needs some testing. Currently, the supported directives are $OmoracleDB, $OmoracleDBUser and $OmoracleDBPassword. $OmoracleDBStatement and $OmoracleDBBatchSize may follow.
| * | | | | | | | Add a SELinux policy that allows the module to load on RHEL5.Luis Fernando Muñoz Mejías2009-04-011-0/+13
| | | | | | | | |
| * | | | | | | | Make tryResume not to retry the last action, but just to reconnect.Luis Fernando Muñoz Mejías2009-04-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core will call the action if tryResume succeeds, no need to make it from here.
| * | | | | | | | added some (hopefully helpful) comments on the calling IFRainer Gerhards2009-03-251-0/+27
| | | | | | | | |
| * | | | | | | | Remove useless dbgprintf and add documentation.Luis Fernando Muñoz Mejías2009-03-251-2/+10
| | | | | | | | |
| * | | | | | | | Add proper indentation (despite Emacs) and support for retrying.Luis Fernando Muñoz Mejías2009-03-251-78/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emacs doesn't allow for proper indentation with rsyslog's macros (no curly brackets, so it doesn't know where functions start), so I had to manually add such indentation. Add support for retrying actions, namely, disconnect from the DB, re-connecting and re-executing the last prepared statement. Needs to be tested.
| * | | | | | | | Add the ability to actually run statements.Luis Fernando Muñoz Mejías2009-03-251-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It now runs SQL statements given as templates. In this case, the template is given on the configuration file and the core passes the SQL statement correctly formatted to doAction. I still need to decide how to structure this for having prepared statements (prepare them at parseSelector time) and then make doAction to only bind arguments and execute. It commits after each statement, which is awfully slow but good enough for the moment. Next step after that is have a buffer of arguments, and make doAction store new data as it arrives, then run the statement only when the buffer is almost full. Or something like that.
| * | | | | | | | Add the ability to connect to the DB based on the config line.Luis Fernando Muñoz Mejías2009-03-251-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will read and parse the config line (this code is not yet rock-solid) and connect to the database at initialization time. I also cleaned some debug messages that are not needed anymore.