Commit graph

10733 commits

Author SHA1 Message Date
Jordan Sissel
1b7e57b8d0 - Update Clients::Search to block on the search ops.
Clients::Search#search now returns [hits, results_array]
2009-10-21 02:06:38 +00:00
Jordan Sissel
a35abbbdad - factor out search client
- make web and bin/search.rb use the new search client class
2009-10-21 01:58:42 +00:00
Jordan Sissel
15b830abc4 - use new BaseConfig for search tool
- limit search results to 100 for now
2009-10-21 01:32:55 +00:00
Jordan Sissel
f42fe931e1 - Use File.basename($0) 2009-10-21 01:03:47 +00:00
Jordan Sissel
875a6a9fee - make the agent use LogStash::Program 2009-10-21 01:02:38 +00:00
Jordan Sissel
21f04f4e8b - remove debugging
- abort if @daemonize and no @logfile set
2009-10-21 01:00:26 +00:00
Pete Fritchman
4879992ab2 - add lib/program.rb to logstash-libs 2009-10-21 00:52:49 +00:00
Jordan Sissel
a2c4c15918 - Add workaround for signal/syscall interruption bug in ruby 1.8.5 2009-10-21 00:47:56 +00:00
Jordan Sissel
1ac4ed62a6 - facter out common program activities to LogStash::Program 2009-10-21 00:41:32 +00:00
Pete Fritchman
8b32b04aea - start using config values for connecting to the broker
- print some warnings when we are reconnecting to the broker (could be
  indicative of bad MQ settings)
2009-10-21 00:36:11 +00:00
Pete Fritchman
3db7ad4a77 - handle pidfile better on shutdown
- INT just calls TERM
2009-10-21 00:13:11 +00:00
Pete Fritchman
dc27987d9e - ENV["LOGSTASH_DIR"] is deprecated. 2009-10-20 23:52:40 +00:00
Pete Fritchman
6d685bfdcf - RPM spec file 2009-10-20 21:57:00 +00:00
Pete Fritchman
e5c9d75efd - fix init script 2009-10-20 21:56:19 +00:00
Jordan Sissel
9ad4e04f89 - open with happier mode (create if not exist, open readwrite) 2009-10-20 21:53:29 +00:00
Pete Fritchman
f3ba581fcb - we want "w+" for the pidfile open because it may not exist yet 2009-10-20 21:24:41 +00:00
Pete Fritchman
282d153d11 - logstash-agent init script & configuration 2009-10-20 21:07:38 +00:00
Pete Fritchman
811ee9410c - make status & condrestart work 2009-10-20 21:07:28 +00:00
Pete Fritchman
a6bb2b9405 - rename agent.rb to logstash-agent 2009-10-20 20:59:47 +00:00
Jordan Sissel
2edda3d34c - Add locking to our pidfile. 2009-10-20 20:59:08 +00:00
Pete Fritchman
b9f811eea5 - fix pattern_dir support (again)
- some defaults
2009-10-20 20:50:02 +00:00
Pete Fritchman
7e7dc90cfa - proper support for pattern_dir 2009-10-20 20:37:57 +00:00
Pete Fritchman
a9bc1324f0 - If one of our children dies, send ourselves a SIGTERM and do a clean
shutdown. We want our OS/watcher/whatever to know logstash is dead,
  rather than continue to run with random children dead.
- Remove pidfile on shutdown
2009-10-20 20:35:16 +00:00
Pete Fritchman
4a70384313 - logfile option 2009-10-20 20:19:46 +00:00
Pete Fritchman
2711d2a6f6 - first pass at rhel init script & sample sysconfig 2009-10-20 20:13:53 +00:00
Pete Fritchman
24169ef165 - refactor agent to be a real daemon
- refactor configs (all inherit from BaseConfig)
- move beef of agent code to lib/net/clients/
- use optionparser's ".order" instead of ".parse"
2009-10-20 17:40:44 +00:00
Jordan Sissel
26082d9309 - Proper daemonizing
- Add --logfile for directing STDOUT and STDERR to a file.
- Require logfile if we are to daemonize
- Set parent process $0 to 'logstash (supervisor)'
2009-10-20 06:59:02 +00:00
Pete Fritchman
c151016413 - support daemonizing
- support a pid file
- set $0 on our indexer & parser children
- handle INT and TERM signals (clean up children)
- switch to waitpid/WNOHANG/sleep(5) loop instead of Process.waitall because
  of a lame bug with ruby 1.8.5 and SIGTERM
2009-10-20 04:55:34 +00:00
Pete Fritchman
8a332a01e2 - logstash_dir is where we write stuff. not necessarily where our patterns
are installed, so allow pattern_dir.
2009-10-20 04:06:44 +00:00
Pete Fritchman
ebbcb3697f - default location is /var/logstash 2009-10-20 03:53:06 +00:00
Pete Fritchman
33222b3ed4 - helper for building release tarball 2009-10-20 03:46:19 +00:00
Pete Fritchman
f47a0aaf48 - move configs into etc/ 2009-10-20 03:45:19 +00:00
Pete Fritchman
c02eb62bcc - remove hacks/testing files that we won't be packaging up 2009-10-20 01:20:58 +00:00
Pete Fritchman
d4459ebf46 - consolidate to one logstashd that forks parsers & indexers
- use logger for output
- stop handling QuitRequests
- re-up broadcast interval to 30 (was @ 5 for debugging)
- add debug output (logstashd -d ...)
2009-10-19 19:03:49 +00:00
Jordan Sissel
e8159ef438 - remove debugging 2009-10-19 10:21:59 +00:00
Jordan Sissel
bff4949129 - responses should always have the same id as the request. 2009-10-19 10:21:49 +00:00
Jordan Sissel
405a813f68 - Move search's Directory querying to be synchronous 2009-10-19 10:19:49 +00:00
Jordan Sissel
e1839d359d - Add ability to do synchronous-like messaging:
op = client.sendmsg("logstash-directory", msg) do |response|
    puts response
    :finished
  end

  op.wait_until_finished
  puts "Done!"

  If Socket#sendmsg is given a block, it will return an Operation that is
  useful shown above.
2009-10-19 10:06:39 +00:00
Jordan Sissel
cd4baf78a6 - move amqp/em into a separate thread.
- Things wanting to block until amqp/em are finished will still call
  Socket#run, which now only blocks until the new amqp/em thread complete (with
  Thread#join)
2009-10-19 08:57:43 +00:00
Pete Fritchman
4afa19646b - include log_type in a LogKeysResponse message 2009-10-19 07:42:10 +00:00
Pete Fritchman
4755c0ae1c - add ability to query what keys are available for a log type
- cache indexreaders, searchers, and queryparsers
2009-10-19 07:09:07 +00:00
Pete Fritchman
6c4c36cdd7 - support querying what log types are available 2009-10-19 06:56:07 +00:00
Pete Fritchman
344e1a4aef - send back [@DATE, @LINE] in search results so we can collate results
from multiple indexers
2009-10-19 06:27:31 +00:00
Pete Fritchman
eeeb7b4cd3 - AMQPize. 2009-10-19 06:23:09 +00:00
Pete Fritchman
257c2de5d0 - actually, since @close is set, it's safe to end EM right here 2009-10-19 05:53:17 +00:00
Pete Fritchman
e909d241ec - less verbose
- make @close work
- main @id queue cannot be :exclusive (nobody else can write)
- properly make topic exchange auto_delete and exclusive
- refactor search.rb client, start towards a common SearchClient class
  (and work with amqp)
2009-10-19 05:52:18 +00:00
Pete Fritchman
56aac96795 s/stomp/amqp/ 2009-10-19 04:36:06 +00:00
Pete Fritchman
27204e825b - remove some debugging cruft
- remove sample agent.redhat.rb; sample config is the same thing
- indexers now broadcast to each other and build up a directory
- indexers respond to a directory request and provide a list of indexers
- move some errors/usage messages to $stderr
- refactor search.rb to query all available indexers
2009-10-18 23:38:35 +00:00
Jordan Sissel
51a0e8ce8a - Add yaml config for agent
- Ignore dotfiles when considering files of grok patterns
- Fix our monkey patch adding String#strip_upper_ascii. This should probably
  just be in another module and take a string as argument.
- Fix bin/search.rb to point at the right queue (indexer serves searches now)
- Fix websearch to point at correct queue.
2009-10-16 09:57:13 +00:00
Jordan Sissel
9d6d58f1d3 - Moved cgrok's svn to named 'grok'. 2009-09-29 02:02:11 +00:00