Allow waiting for a specific number of log occurences
See original GitHub issueDescription
Info
- d-m-p version : 0.17.1
- Maven version (
mvn -v
) : 3.3.9 - Docker version : 1.12.3
Some containers (observed both with postgres:9.5 for example) emit a log message indicating readiness multiple times (probably the db is restarted after initial env setup I assume). Example:
waiting for server to start....LOG: database system was shut down at 2016-12-01 09:31:22 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
done
server started
ALTER ROLE
/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
LOG: received fast shutdown request
LOG: aborting any active transactions
LOG: autovacuum launcher shutting down
waiting for server to shut down....LOG: shutting down
LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
LOG: database system was shut down at 2016-12-01 09:31:30 UTC
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
For such cases it would be useful to specify that the plugin should wait for a specific number of occurences of the specified log message pattern.
Something like:
<wait>
<log>database system is ready to accept connections</log>
<count>2</count>
</wait>
would wait for the second occurrence of the pattern before continuing. This seems it would solve #608 as well.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Troubleshoot active sessions waiting on SYNCH wait events ...
If you see MySQL SYNCH wait events in Performance Insights, this means that a large number of sessions in the database are attempting...
Read more >Conditional Access insights and reporting - Azure
Using the Azure AD Conditional Access insights and reporting workbook to troubleshoot policies.
Read more >[GA4] Monitor events in DebugView - Analytics Help
The DebugView report shows you data (from events, event parameters, and user properties) as Analytics collects the data. The report can help you...
Read more >New Relic data types: metrics, events, logs, and traces (MELT)
An overview of the MELT data New Relic reports: metrics, events, logs, and traces (spans).
Read more >Log4j 2 Lock-free Asynchronous Loggers for Low-Latency ...
yield(), and eventually parks for the minimum number of nanos the OS and JVM will allow while the I/O thread is waiting for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another idea would be to allow multi-line patterns: When the multiline option is enabled in the pattern
(?s)
, then keep all log lines and try to match on the whole log. Of course this can be a bit more memory intensive, but should be easy to add in the LogWatcher.Kudos to @michael-simons for the idea 😉
looks useful to me. We still would have to think about to introduce the configuration. Simply
<count>
doesn’t work because its on the same level a http checks and so on.Ideally we would have something like:
however
<log>
is already burned (for backwards compatibility). Maybe<out>
or<stdout>
(with then in addition<stderr>
, too) would be a good fit as alternative for the extended definition ?