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
|
my @other_lines
|
||||||
= grep { $_ !~ m/pt-agent (?:--run-service|--send-data)/ }
|
= grep { $_ !~ m/pt-agent (?:--run-service|--send-data)/ }
|
||||||
split("\n", $crontab_list);
|
split("\n", $crontab_list);
|
||||||
PTDEBUG && _d('Other crontab lines:', \@other_lines);
|
PTDEBUG && _d('Other crontab lines:', Dumper(\@other_lines));
|
||||||
|
|
||||||
my @pt_agent_lines;
|
my @pt_agent_lines;
|
||||||
foreach my $service ( @$services ) {
|
foreach my $service ( @$services ) {
|
||||||
@@ -4907,7 +4907,7 @@ sub make_new_crontab {
|
|||||||
. $service->name;
|
. $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";
|
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
|
# 2nd check, init with latest Config and Services
|
||||||
{
|
{
|
||||||
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
||||||
content => as_hashref($config),
|
content => as_hashref($config, with_links => 1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
||||||
content => [ as_hashref($svc0) ],
|
content => [ as_hashref($svc0, with_links => 1) ],
|
||||||
},
|
},
|
||||||
# interval
|
# interval
|
||||||
# 3rd check, same Config and Services so nothing to do
|
# 3rd check, same Config and Services so nothing to do
|
||||||
{
|
{
|
||||||
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
headers => { 'X-Percona-Resource-Type' => 'Config' },
|
||||||
content => as_hashref($config),
|
content => as_hashref($config, with_links => 1),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
headers => { 'X-Percona-Resource-Type' => 'Service' },
|
||||||
content => [ as_hashref($svc0) ],
|
content => [ as_hashref($svc0, with_links => 1) ],
|
||||||
},
|
},
|
||||||
# interval, oktorun=0
|
# interval, oktorun=0
|
||||||
];
|
];
|
||||||
|
@@ -4,13 +4,14 @@
|
|||||||
},
|
},
|
||||||
"name" : "query-monitor",
|
"name" : "query-monitor",
|
||||||
"run_schedule" : "1 * * * *",
|
"run_schedule" : "1 * * * *",
|
||||||
"runs" : [
|
"spool_schedule" : "2 * * * *",
|
||||||
|
"tasks" : [
|
||||||
{
|
{
|
||||||
|
"name" : "query-history",
|
||||||
"number" : "0",
|
"number" : "0",
|
||||||
"options" : "--output json",
|
"options" : "--output json",
|
||||||
"output" : "spool",
|
"output" : "spool",
|
||||||
"program" : "pt-query-digest"
|
"program" : "pt-query-digest"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"spool_schedule" : "2 * * * *"
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user