Commit Graph

1291 Commits

Author SHA1 Message Date
Daniel Nichter
98a4d9c2d5 Fix typo in run_service(): write data to --spool/.tmp/. 2013-04-09 11:34:02 -06:00
Daniel Nichter
d142a4650c Add --lib/meta/ to save ts for previous --run-serivce so samples are collected at distinct intervals. Send start_ts and end_ts as metadata for --send-data. 2013-04-09 11:18:04 -06:00
Daniel Nichter
5cc1663520 Fix --send-data causing 'Use of uninitialized value $exit_status'. 2013-04-08 17:16:16 -06:00
Daniel Nichter
9e15315c6a Put env vars in correct place in crontab lines. 2013-04-08 17:01:13 -06:00
Daniel Nichter
36e417363d Add certain env vars to crontab commands. Run one start-once service at a time and warn if any one fails. Temp hack to stop running turn-off services. 2013-04-08 16:56:26 -06:00
Daniel Nichter
a9e06286af Handle run-once services. Stub implementation of --stop. 2013-04-08 16:17:08 -06:00
Daniel Nichter
c46a0e3199 Fix init_config_file() when config file doesn't exist yet. 2013-04-08 15:16:53 -06:00
Daniel Nichter
3d20ff5f54 Update docs re installing. 2013-04-08 13:33:58 -06:00
Daniel Nichter
6b91c5b06e Fix/finish re-daemonizing. Make parent print a line about the running daemon before exiting (so user knows that pt-agent is running and "where"). Try to connect to MySQL once at first, but TODO: re-try to connect to MySQL later until successful. 2013-04-06 10:48:59 -06:00
Daniel Nichter
62a30edcea Make it so pt-agent can "re-daemonize" without restarting, i.e. change it's --log and --pid on the fly. 2013-04-05 20:03:43 -06:00
Daniel Nichter
2ac102da0b Large refactoring of pt-agent to make the initial start up experience more reliable, i.e. just run and wait till a good config makes everything else work. 2013-04-05 18:12:33 -06:00
Daniel Nichter
3d5325ae03 Rewrite Daemon.pm: don't require an OptionParser, one public func, run(), that does the whole daemonize process or just check the PID file. 2013-04-05 12:16:16 -06:00
Daniel Nichter
afa6533f43 Fix and test resource_diff(). 2013-03-27 11:12:38 -06:00
Daniel Nichter
13e9b5d7c7 Fix typo checking spool data file size. 2013-03-26 14:41:16 -06:00
Daniel Nichter
b17f45d3cd Fix spool file. Actually write run and send PID files. 2013-03-26 14:36:58 -06:00
Daniel Nichter
58ea0f1886 Fix 'Modification of a read-only value attempted at /home/ptagent/pt-agent/bin/pt-agent line 5691'. 2013-03-26 14:26:40 -06:00
Daniel Nichter
b9a82c21b9 Always init lib dir when applying first config. 2013-03-26 14:20:45 -06:00
Daniel Nichter
ba2b26a9c7 Init spool dir when confnig is applied. Use lib/logs and lib/pids for run and send logs and pids. Spool data to tmp dir first then mv to spool. 2013-03-26 14:10:01 -06:00
Daniel Nichter
6b89da736b Fix minor typo. 2013-03-26 10:29:05 -06:00
Daniel Nichter
ba7d55910b Check silently for first config every 60s. Check --lib dir earlier, but this is a TODO still. Replace __LIB__ and __SERVICE__ in tasks. 2013-03-26 10:20:13 -06:00
Daniel Nichter
cbc67774b3 Log --run-service and --send-data. Spool to separate files with .TS suffixes. Use /tmp until --lib is valid. Daemonize early. Replace __TS_MICRO__ in task options. 2013-03-26 09:08:37 -06:00
Daniel Nichter
6e1e70477e Fix 'Undefined subroutine &pt_agent::get'. 2013-03-26 08:15:04 -06:00
Daniel Nichter
10a3dbdcf1 Fix get_api_client() so it doesn't loop out of controll if PWS doesn't return valid entry links. 2013-03-25 15:58:46 -06:00
Daniel Nichter
bdc3487919 Add and test start_services() for Service.run_once_on_start. 2013-03-25 14:27:53 -06:00
Daniel Nichter
2eff2692fe Fix detecting new lib dir. Fix removing service files. 2013-03-22 17:07:02 -06:00
Daniel Nichter
9e1d935e19 Add Service.run_once_on_start. Refactor get config and get services blocks. 2013-03-22 12:08:45 -06:00
Daniel Nichter
c1cce0c6ca Get and send real program version when the agent starts. 2013-03-21 13:50:49 -06:00
Daniel Nichter
f04d0e575a Write pt-agent docs. 2013-03-21 11:49:29 -06:00
Daniel Nichter
0e9e897791 Use 'Content-Type: multipart/form-data; boundary=Ym91bmRhcnk' to send multi-part data. 2013-03-21 07:52:21 -06:00
Daniel Nichter
cf0342c69e Implement and test running queries for tasks. 2013-03-19 18:17:24 -06:00
Daniel Nichter
846daa6c31 Fix/update/test sending data. Rename query-monitor to query-server in tests. 2013-03-19 16:35:37 -06:00
Daniel Nichter
5a65305a47 Update pt-agent to run tasks not runs. 2013-03-19 15:37:55 -06:00
Daniel Nichter
9afa462cc2 Fix/update t/pt-agent/run_agent.t. 2013-03-19 14:56:53 -06:00
Daniel Nichter
2291a3c6c6 Update Lmo in pt-agent. Start fixing pt-agent tests. 2013-03-19 12:10:22 -06:00
Daniel Nichter
f353600076 Merge release-2.2.1 to get Lmo with headers. 2013-03-19 11:56:17 -06:00
Daniel Nichter
9286765076 Merge 2.2.1 to get pqd without --output json. 2013-03-19 11:36:21 -06:00
Daniel Nichter
d28faa9b25 Don't require Task program or output attrib values. 2013-03-19 11:31:22 -06:00
Brian Fraser
f591534a1b Merged lp:~percona-toolkit-dev/percona-toolkit/pt-heartbeat-read_only-28934 2013-03-15 15:10:24 -03:00
Daniel Nichter
84ab975438 Fix query time diff formatting in pt-upgrade. 2013-03-14 09:20:54 -06:00
Brian Fraser
d3612481c2 Merged remove-ptqa 2013-03-13 16:55:22 -03:00
Daniel Nichter
5ddfb95ca7 Fix lib/Cxn.pm that didn't merge correctly. Fix t/lib/OptionParser.t test failure. Update Cxn, OptionParser, and DSNParser in all tools. 2013-03-13 12:38:45 -06:00
Daniel Nichter
35683d5261 Fix pt-upgrade: remove duplicate --database option and alphabetize the rest. 2013-03-13 10:44:40 -06:00
Brian Fraser
55bb01bb6e Removed pt-query-advisor 2013-03-13 11:50:08 -03:00
Daniel Nichter
5a5fe75130 Merge pt-stalk-1019648. 2013-03-12 15:23:02 -06:00
Daniel Nichter
7f728acddd Move code to get InnoDB status into its own sub. 2013-03-12 15:08:25 -06:00
Daniel Nichter
d0c40f0a65 Merge fix-1086018-pt-config-diff-wsrep_provider_options. 2013-03-12 09:29:18 -06:00
Daniel Nichter
f542d59776 Merge fix-1008796-add-database-to-several-tools. 2013-03-12 09:26:22 -06:00
Daniel Nichter
4cbd8c2295 Update Percona::Toolkit::VERSION in all tools. 2013-03-14 10:27:23 -07:00
Daniel Nichter
b20316d50f Pre-build check and update. 2013-03-14 10:20:35 -07:00
Daniel Nichter
de7b8ca0e5 Merge 2.1.9, including its s/Percona Inc/Percona Ireland Ltd/ changes. 2013-03-14 10:58:03 -06:00