mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
Fix/update t/pt-agent/run_agent.t.
This commit is contained in:
@@ -4892,7 +4892,7 @@ sub make_new_crontab {
|
||||
my @other_lines
|
||||
= grep { $_ !~ m/pt-agent (?:--run-service|--send-data)/ }
|
||||
split("\n", $crontab_list);
|
||||
PTDEBUG && _d('Other crontab lines:', \@other_lines);
|
||||
PTDEBUG && _d('Other crontab lines:', Dumper(\@other_lines));
|
||||
|
||||
my @pt_agent_lines;
|
||||
foreach my $service ( @$services ) {
|
||||
@@ -4907,7 +4907,7 @@ sub make_new_crontab {
|
||||
. $service->name;
|
||||
}
|
||||
}
|
||||
PTDEBUG && _d('pt-agent crontab lines:', \@pt_agent_lines);
|
||||
PTDEBUG && _d('pt-agent crontab lines:', Dumper(\@pt_agent_lines));
|
||||
|
||||
my $new_crontab = join("\n", @other_lines, @pt_agent_lines) . "\n";
|
||||
|
||||
|
@@ -234,21 +234,21 @@ $ua->{responses}->{get} = [
|
||||
# 2nd check, init with latest Config and Services
|
||||
{
|
||||
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
||||
content => as_hashref($config),
|
||||
content => as_hashref($config, with_links => 1),
|
||||
},
|
||||
{
|
||||
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
||||
content => [ as_hashref($svc0) ],
|
||||
content => [ as_hashref($svc0, with_links => 1) ],
|
||||
},
|
||||
# interval
|
||||
# 3rd check, same Config and Services so nothing to do
|
||||
{
|
||||
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
||||
content => as_hashref($config),
|
||||
content => as_hashref($config, with_links => 1),
|
||||
},
|
||||
{
|
||||
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
||||
content => [ as_hashref($svc0) ],
|
||||
content => [ as_hashref($svc0, with_links => 1) ],
|
||||
},
|
||||
# interval, oktorun=0
|
||||
];
|
||||
|
@@ -4,13 +4,14 @@
|
||||
},
|
||||
"name" : "query-monitor",
|
||||
"run_schedule" : "1 * * * *",
|
||||
"runs" : [
|
||||
"spool_schedule" : "2 * * * *",
|
||||
"tasks" : [
|
||||
{
|
||||
"name" : "query-history",
|
||||
"number" : "0",
|
||||
"options" : "--output json",
|
||||
"output" : "spool",
|
||||
"program" : "pt-query-digest"
|
||||
}
|
||||
],
|
||||
"spool_schedule" : "2 * * * *"
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user