- OS Support
- Enterprise Edition Reference Manual
- 129. Man Pages
- 130. Configuration
- 131. Language
- 132. Extension Modules
- 133. Input Modules
- 134. Processor Modules
- 134.1. Blocker (pm_blocker)
- 134.2. Buffer (pm_buffer)
- 134.3. Event Correlator (pm_evcorr)
- 134.4. Filter (pm_filter)
- 134.5. HMAC Message Integrity (pm_hmac)
- 134.6. HMAC Message Integrity Checker (pm_hmac_check)
- 134.7. De-Duplicator (pm_norepeat)
- 134.8. Null (pm_null)
- 134.9. Pattern Matcher (pm_pattern)
- 134.10. Format Converter (pm_transformer)
- 134.11. Timestamping (pm_ts)
- 135. Output Modules
- NXLog Manager
- NXLog Add-Ons
This module blocks log messages and can be used to simulate a blocked route. When the module blocks the data flow, log messages are first accumulated in the buffers, and then the flow control mechanism pauses the input modules. Using the block() procedure, it is possible to programmatically stop or resume the data flow. It can be useful for real-world scenarios as well as testing. See the examples below. When the module starts, the blocking mode is disabled by default (it operates like pm_null would).
|To examine the supported platforms, see the list of installer packages in the Available Modules chapter.|
The pm_blocker module accepts only the common module directives.
The following functions are exported by pm_blocker.
Return TRUE if the module is currently blocking the data flow, FALSE otherwise.
The following procedures are exported by pm_blocker.
When mode is TRUE, the module will block. A
block(FALSE)should be called from a Schedule block or another module, it might not get invoked if the queue is already full.
In this example messages are received over UDP and forwarded to another host via TCP. The log data is forwarded during non-working hours (between 7pm and 8am). During working hours, the data is buffered on the disk.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 <Input udp> Module im_udp ListenAddr 0.0.0.0:1514 </Input> <Processor buffer> Module pm_buffer # 100 MB disk buffer MaxSize 102400 Type disk </Processor> <Processor blocker> Module pm_blocker <Schedule> When 0 8 * * * Exec blocker->block(TRUE); </Schedule> <Schedule> When 0 19 * * * Exec blocker->block(FALSE); </Schedule> </Processor> <Output tcp> Module om_tcp Host 192.168.1.1:1514 </Output> <Route udp_to_tcp> Path udp => buffer => blocker => tcp </Route>