Commit Graph

2499 Commits

Author SHA1 Message Date
Daniel Nichter
b1d3238764 Add a repose to --send-data --interactive. 2013-06-12 08:58:21 -07:00
Daniel Nichter
f5d9fb08e1 Make --interactcive disable --log-api. 2013-06-12 08:45:46 -07:00
Daniel Nichter
61041fa8fa Handle server messages as array or single string. 2013-06-12 08:35:34 -07:00
Daniel Nichter
83ef2bd1fd Fix getting MySQL version. 2013-06-11 19:19:50 -07:00
Daniel Nichter
a424b212fd Remove XXX hack from pqd that makes it write every thing it reads to /tmp/slow.log* files. 2013-06-11 18:49:38 -07:00
Daniel Nichter
55ef1abacf Add run_time to metadata. 2013-06-11 13:32:03 -07:00
Daniel Nichter
58cddd28ef Fix online_logging argument because --log-api returns 'yes' but --no-log-api returns 0. 2013-06-11 11:13:25 -07:00
Daniel Nichter
a54f59626f Fix send_data() and run_services(). Add --interactive. Print message about starting online logging in start_online_logging() to avoid false-positive. eval send_data() and run_service() to catch spurious errors. 2013-06-11 11:11:11 -07:00
Daniel Nichter
d15731c4c3 Remove --log-level and add --log-api to control online logging. 2013-06-11 10:39:46 -07:00
Daniel Nichter
b40db4ac7b Allow online logging to be disabled. 2013-06-11 10:36:42 -07:00
Daniel Nichter
116adafbef Fix parsing server error message. Add 'sending' and 'running' suffixes to service names. 2013-06-11 10:11:58 -07:00
Daniel Nichter
058bc30e27 Actually include the n_lines in the log entry line. 2013-06-10 20:15:16 -07:00
Daniel Nichter
4db9aac13b Fix typo in run_services(). Print random stuff on STDERR as warnings. 2013-06-10 20:11:03 -07:00
Daniel Nichter
8641d55a4e Fix log entry line regex. 2013-06-10 20:02:32 -07:00
Daniel Nichter
bee0c7a5f1 Handle multi-line log events. 2013-06-10 19:59:39 -07:00
Daniel Nichter
6e3ba2ce24 Make Logger data_ts and service attribs rw. 2013-06-09 20:05:54 -07:00
Daniel Nichter
317b7d538b Set logger service and data_ts. 2013-06-09 20:03:15 -07:00
Daniel Nichter
2b6097028d Use online logging for --run-service. 2013-06-09 19:53:54 -07:00
Daniel Nichter
ad4e9a9207 Fix pipe handling so all log entries are written. 2013-06-09 19:29:52 -07:00
Daniel Nichter
aadb5dbd80 Queue buffered log entries when destroyed. 2013-06-09 17:33:01 -07:00
Daniel Nichter
0b16c02468 Don't GET the log link, just use it. 2013-06-09 17:18:34 -07:00
Daniel Nichter
8eff03c294 Add pid to LogEntry. Use online logging for --send-data. 2013-06-09 17:15:16 -07:00
Daniel Nichter
34bc178cd8 Rewrite Logger using pipes because Perl threads cause a small memory leak. 2013-06-09 15:53:35 -07:00
Daniel Nichter
e26a8744ef Queue and log all entries online. 2013-06-09 11:54:10 -07:00
Daniel Nichter
bcb3758f64 Make Percona/Agent/Logger always log online. 2013-06-09 10:31:56 -07:00
Daniel Nichter
490a8a7c90 Don't crash if disk space check fails. 2013-06-09 09:53:10 -07:00
Daniel Nichter
f583ec6113 Update pqd so it works, sends actual new data struct. 2013-06-06 13:37:16 -05:00
Daniel Nichter
912d648922 Hack JSON output back to original struct so pt-agent works with server until server can understand the new data struct. 2013-05-28 20:03:19 -07:00
Daniel Nichter
2dbe188d5b Add service, data_ts, and entry_ts to LogEntry resource. Add corresponding attribs to Logger, as well as queue_wait. 2013-05-28 20:00:59 -07:00
Daniel Nichter
95474b1669 Implement new JSON data struct in pqd. 2013-05-22 19:40:33 -07:00
Daniel Nichter
c99cb3ba58 Add copy_paste attrib to each query's hash in the JSON output with SHOW TABLE STATUS, SHOW CREATE TABLE, and non-SELECT converted to SELECT for EXPLAIN. Fix typo: EA type is 'string' not 'str'. Add host, port, and ip type hints to pqd. 2013-05-20 16:44:44 -07:00
Daniel Nichter
41a4634edb Update JSONReportFormatter: report all str attribs; don't print "# No events processed" since that's not valid JSON; rename output.t to json.t. 2013-05-20 14:47:01 -07:00
Daniel Nichter
2f368be7d3 Stop online logging via flag first, then print, then stop the thread which takes a few seconds. 2013-05-20 14:07:03 -07:00
Daniel Nichter
99592409e6 Add Logger::stop_online_logging(). 2013-05-20 14:03:39 -07:00
Daniel Nichter
20c3bd6c29 Destroy Logger object. Add LogEntry module/resource. 2013-05-20 13:49:51 -07:00
Daniel Nichter
52e37e2dc2 Fix stopping logger thread for real. 2013-05-19 12:46:47 -07:00
Daniel Nichter
52d9a91b4d Fix stopping the logging thread on Ctrl-C, I think. 2013-05-19 12:09:51 -07:00
Daniel Nichter
5e2133e978 For --install, set new MySQL user and pass in /etc/percona/agent/my.cnf. 2013-05-19 11:51:37 -07:00
Daniel Nichter
e8fc50dad1 Enable online logging manually in Logger::enable_online_logging() instead of BUILD() because threads don't share data. 2013-05-17 09:59:20 -07:00
Daniel Nichter
fe50f5d916 Fix type: _message_queue, not message_queue. 2013-05-17 09:47:36 -07:00
Daniel Nichter
ea481471c0 Always build message queue, don't dequeue until it exists though. 2013-05-17 09:45:09 -07:00
Daniel Nichter
e2aab02bee Add sleep time between log queue sends. 2013-05-17 09:36:36 -07:00
Daniel Nichter
df6ba9f3a5 First implementation of online logging. 2013-05-17 09:32:32 -07:00
Daniel Nichter
883590d448 Fix type in --log-level POD. 2013-05-16 16:25:57 -07:00
Daniel Nichter
a0ba15c27e Implement Percona::Agent::Logger without logging via API yet. 2013-05-16 16:22:36 -07:00
Daniel Nichter
82af5eaef1 Create lib/Percona/Agent/Logger.pm for asynchronous agent status logging via the API. 2013-05-15 18:31:08 -07:00
Daniel Nichter
297416bc75 Always print line about when servies will restart after disk space check. 2013-05-15 15:19:17 -07:00
Daniel Nichter
ef99c02cfc Don't keep stopping services when the disk space threshold checks fail. 2013-05-15 15:15:46 -07:00
Daniel Nichter
934e0b1f65 Pass a Safeguards to run_agent() and check_disk_space() with each check-in. Factor stop_all_services() from stop_agent(). 2013-05-15 14:19:01 -07:00
Daniel Nichter
84c8906de4 Create lib/Safeguards.pm to implement new --disk-bytes-free and --disk-pct-free in pt-agent. 2013-05-15 13:27:44 -07:00