Daniel Nichter
|
89db22894e
|
Test get_services(). Need to fix/update other tests.
|
2013-04-19 14:49:01 -06:00 |
|
Daniel Nichter
|
c7c79945f9
|
Change start_services() to run_services() and make it do triple duty: start, restart, and stop. When a real service is removed, call its stop- meta-service before write_services(). Add run_services_once() for services with the run_once flag.
|
2013-04-18 18:41:05 -06:00 |
|
Daniel Nichter
|
7cee5a480e
|
Add ts to Service resource. Rewrite how pt-agent handles applying services: use new meta attrib to find real service, then look for start-service and stop-service; schedule anything with a run_schedule or spool_schedule. Remove Percona/WebAPI/Util.
|
2013-04-18 16:47:15 -06:00 |
|
Daniel Nichter
|
a32a583e05
|
Fix and test error on startup if config file is missing. Refactor run_agent(): move Agent setup stuff into start_agent(). Move related subs next to each other.
|
2013-04-13 11:27:45 -06:00 |
|
Daniel Nichter
|
2d89fe6163
|
Update/fix run_agent.t. Set action and link in run_agent() when given test agent. Fix apply_config(): don't die if config file doesn't exist. Expect Config.lib to be set. Fix run_service(): run run_once services without meta or syncing time interval.
|
2013-04-13 10:24:52 -06:00 |
|
Daniel Nichter
|
80b79c962b
|
Start changing how pt-agent handles metadata.
|
2013-04-12 18:05:47 -06:00 |
|
Daniel Nichter
|
9be4a1d08e
|
Fix saving interval meta file. Fix error when tmp data file doesn't exist.
|
2013-04-11 10:34:54 -06:00 |
|
Daniel Nichter
|
e37e30dd01
|
Don't init the config file: this was really just overwriting it which caused problems for a manually set config when pt-agent couldn't get a config from PWS.
|
2013-04-10 17:44:10 -06:00 |
|
Daniel Nichter
|
cb3952291a
|
Make --stop check for files.
|
2013-04-10 17:29:33 -06:00 |
|
Daniel Nichter
|
b37b544922
|
Remove trailing . from URL to make copy-paste easy.
|
2013-04-10 17:25:55 -06:00 |
|
Daniel Nichter
|
96c681d07c
|
Improve the parent daemon message.
|
2013-04-10 17:23:27 -06:00 |
|
Daniel Nichter
|
d63bc8c9d1
|
Make Agent.username and .hostname optional so they can be loaded from a minimal agent file and updated at runtime.
|
2013-04-10 17:03:27 -06:00 |
|
Daniel Nichter
|
1f5e5ede61
|
Update Agent in pt-agent.
|
2013-04-10 16:59:37 -06:00 |
|
Daniel Nichter
|
7bfc694be4
|
Change Agent.user to Agent.username and make it and hostname rw.
|
2013-04-10 16:57:06 -06:00 |
|
Daniel Nichter
|
9fbfa89c87
|
Thread-safe mkdir. Don't init spool dirs for services that don't spool.
|
2013-04-10 16:46:15 -06:00 |
|
Daniel Nichter
|
9958be5419
|
Round down ts seconds to :00.
|
2013-04-10 16:08:22 -06:00 |
|
Daniel Nichter
|
aecdca7420
|
Add Agent.user attribute.
|
2013-04-10 15:52:18 -06:00 |
|
Daniel Nichter
|
19287b6526
|
Go back to not spooling empty sample files.
|
2013-04-09 18:49:27 -06:00 |
|
Daniel Nichter
|
62987419ae
|
Remove some info messages from stop_agent().
|
2013-04-09 18:33:00 -06:00 |
|
Daniel Nichter
|
efdfa0fdef
|
Fix disabling services in stop_agent().
|
2013-04-09 18:29:17 -06:00 |
|
Daniel Nichter
|
c246bf12f3
|
Use TERM instead of QUIT signal so pt-agent can trap it.
|
2013-04-09 18:20:44 -06:00 |
|
Daniel Nichter
|
279b8f2188
|
Implement --stop.
|
2013-04-09 18:15:12 -06:00 |
|
Daniel Nichter
|
79c8705f02
|
Update default entry link. Handle catch/exit on signal better, faster.
|
2013-04-09 17:32:43 -06:00 |
|
Daniel Nichter
|
1cb611b574
|
Don't pass entry_link unless given to avoid stack trace error.
|
2013-04-09 17:12:11 -06:00 |
|
Daniel Nichter
|
b8b01d6820
|
Remove hack to avoid starting turn-off services.
|
2013-04-09 16:57:25 -06:00 |
|
Daniel Nichter
|
2500de710f
|
Fix query-history/data POST data.
|
2013-04-09 16:32:56 -06:00 |
|
Daniel Nichter
|
0869936f86
|
Fix sending/encoding the meta file.
|
2013-04-09 15:12:35 -06:00 |
|
Daniel Nichter
|
da27f42c2b
|
Remove lib/meta/* in start_services().
|
2013-04-09 14:58:08 -06:00 |
|
Daniel Nichter
|
9555b26920
|
Don't use .start files because they won't work like I was thinking. Just removing meta/service* should be enough. Only use metadata for services that spool.
|
2013-04-09 14:48:40 -06:00 |
|
Daniel Nichter
|
f9561a7197
|
Use correct start log.
|
2013-04-09 14:20:16 -06:00 |
|
Daniel Nichter
|
c900f77a69
|
Make start_services() rm meta/service*. Write lib/service.start when a service starts, and don't run_service() unless this file is present.
|
2013-04-09 14:12:48 -06:00 |
|
Daniel Nichter
|
b77612d730
|
Remove .microseconds from start_ts and end_ts.
|
2013-04-09 12:26:48 -06:00 |
|
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 |
|