diff --git a/src/apps/automation/ansible/tower/mode/jobs.pm b/src/apps/automation/ansible/tower/mode/jobs.pm index 1592d491a..008cb6890 100644 --- a/src/apps/automation/ansible/tower/mode/jobs.pm +++ b/src/apps/automation/ansible/tower/mode/jobs.pm @@ -24,6 +24,7 @@ use base qw(centreon::plugins::templates::counter); use strict; use warnings; +use Date::Parse; use centreon::plugins::statefile; sub prefix_output_global { @@ -41,24 +42,24 @@ sub set_counters { $self->{maps_counters}->{global} = [ { label => 'total', nlabel => 'jobs.total.count', set => { - key_values => [ { name => 'total' } ], - output_template => 'total: %d', - perfdatas => [ - { value => 'total', template => '%d', min => 0 } - ] - } + key_values => [ { name => 'total' } ], + output_template => 'total: %d', + perfdatas => [ + { value => 'total', template => '%d', min => 0 } + ] + } } ]; - foreach ((['successful', 1], ['failed', 1], ['running', 1], ['canceled', 0], ['pending', 0], ['default', 0])) { + foreach (([ 'successful', 1 ], [ 'failed', 1 ], [ 'running', 1 ], [ 'canceled', 0 ], [ 'pending', 0 ], [ 'default', 0 ])) { push @{$self->{maps_counters}->{global}}, { - label => $_->[0], nlabel => 'jobs.' . $_->[0] . '.count', display_ok => $_->[1], set => { - key_values => [ { name => $_->[0] }, { name => 'total' } ], - output_template => $_->[0] . ': %d', - perfdatas => [ - { template => '%d', min => 0, max => 'total' } - ] - } + label => $_->[0], nlabel => 'jobs.' . $_->[0] . '.count', display_ok => $_->[1], set => { + key_values => [ { name => $_->[0] }, { name => 'total' } ], + output_template => $_->[0] . ': %d', + perfdatas => [ + { template => '%d', min => 0, max => 'total' } + ] + } }; } } @@ -70,6 +71,7 @@ sub new { $options{options}->add_options(arguments => { 'filter-name:s' => { name => 'filter_name' }, + 'filter-time:s' => { name => 'filter_time' }, 'display-failed-jobs' => { name => 'display_failed_jobs' }, 'memory' => { name => 'memory' } }); @@ -85,8 +87,8 @@ sub check_options { if (defined($self->{option_results}->{memory})) { $self->{statefile_cache}->check_options(%options); centreon::plugins::misc::mymodule_load( - output => $self->{output}, - module => 'Date::Parse', + output => $self->{output}, + module => 'Date::Parse', error_msg => "Cannot load module 'Date::Parse'." ); } @@ -108,14 +110,18 @@ sub manage_selection { my $current_time = time(); my $failed_jobs = {}; foreach my $job (@$jobs) { - next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' - && $job->{name} !~ /$self->{option_results}->{filter_name}/); + next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' + && $job->{name} !~ /$self->{option_results}->{filter_name}/); + + next if (defined($self->{option_results}->{filter_time}) + && defined($job->{finished}) + && $current_time - Date::Parse::str2time($job->{finished}) > $self->{option_results}->{filter_time} * 3600); if (defined($self->{option_results}->{memory}) && defined($job->{finished})) { my $finished_time = Date::Parse::str2time($job->{finished}); if (!defined($finished_time)) { $self->{output}->output_add( - severity => 'UNKNOWN', + severity => 'UNKNOWN', short_msg => "Can't parse date '" . $job->{finished} . "'" ); next; @@ -135,7 +141,7 @@ sub manage_selection { } if (defined($self->{option_results}->{display_failed_jobs})) { - $self->{output}->output_add(long_msg => 'Failed jobs list: ' . join(', ', keys %$failed_jobs)); + $self->{output}->output_add(long_msg => 'Failed jobs list: ' . join(', ', keys %$failed_jobs)); } } @@ -151,16 +157,75 @@ Check jobs. =item B<--filter-name> -Filter job name (can use regexp). +Define which jobs should be monitored based on their names. This option will be treated as a regular expression. + +=item B<--filter-time> + +Define which jobs should be monitored based on the age of their last execution. Jobs that finished longer than X hours ago will be ignored. =item B<--display-failed-jobs> Display failed jobs list in verbose output. -=item B<--warning-*> B<--critical-*> +=item B<--memory> -Thresholds. -Can be: 'total', 'successful', 'failed', 'running', 'canceled', 'pending', 'default'. +Only check new jobs. + +=item B<--warning-total> + +Threshold warning for total jobs. + +=item B<--critical-total> + +Threshold critical for total jobs. + +=item B<--warning-successful> + +Threshold warning for successful jobs. + +=item B<--critical-successful> + +Threshold critical for successful jobs. + +=item B<--warning-failed> + +Threshold warning for failed jobs. + +=item B<--critical-failed> + +Threshold critical for failed jobs. + +=item B<--warning-running> + +Threshold warning for running jobs. + +=item B<--critical-running> + +Threshold critical for running jobs. + +=item B<--warning-canceled> + +Threshold warning for canceled jobs. + +=item B<--critical-canceled> + +Threshold critical for canceled jobs. + +=item B<--warning-pending> + +Threshold warning for pending jobs. + +=item B<--critical-pending> + +Threshold critical for pending jobs. + +=item B<--warning-default> + +Threshold warning for default jobs. + +=item B<--critical-default> + +Threshold critical for default jobs. =back diff --git a/tests/apps/automation/ansible/tower/ansible_tower.json b/tests/apps/automation/ansible/tower/ansible_tower.json index 888ad28a4..cec399f07 100644 --- a/tests/apps/automation/ansible/tower/ansible_tower.json +++ b/tests/apps/automation/ansible/tower/ansible_tower.json @@ -17,7 +17,7 @@ "responses": [ { "uuid": "a4edd4f6-d560-44d5-8faf-3e6d532e22b4", - "body": "{\n \"count\": 20,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"results\": [\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 14,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-13\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/14/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/14/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/14/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/14/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/14/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/14/groups/\",\n \"insights\": \"/api/v2/hosts/14/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/14/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/14/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/14/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/14/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/14/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/14/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 15,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-14\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/15/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/15/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/15/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/15/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/15/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/15/groups/\",\n \"insights\": \"/api/v2/hosts/15/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/15/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/15/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/15/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/15/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/15/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/15/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 16,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-15\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/16/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/16/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/16/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/16/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/16/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/16/groups/\",\n \"insights\": \"/api/v2/hosts/16/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/16/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/16/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/16/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/16/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/16/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/16/\",\n \"variables\": \"{\\\"test1\\\": \\\"1\\\", \\\"test2\\\": \\\"2\\\"}\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 17,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-16\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/17/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/17/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/17/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/17/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/17/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/17/groups/\",\n \"insights\": \"/api/v2/hosts/17/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/17/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/17/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/17/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/17/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/17/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/17/\",\n \"variables\":\"{\\\"ansible_host\\\": \\\"192.168.1.10\\\", \\\"ansible_ssh_host\\\": \\\"192.168.1.10\\\", \\\"ansible_uuid\\\": \\\"6e5f58b4-692a-5df2-ab14-8d51c1813112\\\"}\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 18,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-17\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/18/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/18/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/18/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/18/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/18/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/18/groups/\",\n \"insights\": \"/api/v2/hosts/18/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/18/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/18/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/18/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/18/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/18/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/18/\",\n \"variables\":\"{\\\"ansible_host\\\": \\\"192.168.1.12\\\", \\\"ansible_ssh_host\\\": \\\"192.168.1.12\\\", \\\"ansible_uuid\\\": \\\"6e5f58b4-692a-5df2-ab14-8d51c1813112\\\"}\"\n }\n ]\n}", + "body": "{\n \"count\": 20,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/hosts\"{{else}}null{{/if}},\n \"results\": [\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 14,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-13\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/14/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/14/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/14/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/14/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/14/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/14/groups/\",\n \"insights\": \"/api/v2/hosts/14/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/14/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/14/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/14/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/14/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/14/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/14/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 15,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-14\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/15/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/15/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/15/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/15/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/15/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/15/groups/\",\n \"insights\": \"/api/v2/hosts/15/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/15/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/15/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/15/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/15/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/15/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/15/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 16,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-15\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/16/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/16/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/16/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/16/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/16/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/16/groups/\",\n \"insights\": \"/api/v2/hosts/16/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/16/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/16/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/16/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/16/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/16/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/16/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 17,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-16\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/17/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/17/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/17/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/17/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/17/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/17/groups/\",\n \"insights\": \"/api/v2/hosts/17/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/17/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/17/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/17/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/17/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/17/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/17/\",\n \"variables\": \"\"\n },\n {\n \"ansible_facts_modified\": null,\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"enabled\": true,\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"id\": 18,\n \"insights_system_id\": null,\n \"instance_id\": \"\",\n \"inventory\": 1,\n \"last_job\": null,\n \"last_job_host_summary\": null,\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"host-17\",\n \"related\": {\n \"activity_stream\": \"/api/v2/hosts/18/activity_stream/\",\n \"ad_hoc_command_events\": \"/api/v2/hosts/18/ad_hoc_command_events/\",\n \"ad_hoc_commands\": \"/api/v2/hosts/18/ad_hoc_commands/\",\n \"all_groups\": \"/api/v2/hosts/18/all_groups/\",\n \"ansible_facts\": \"/api/v2/hosts/18/ansible_facts/\",\n \"groups\": \"/api/v2/hosts/18/groups/\",\n \"insights\": \"/api/v2/hosts/18/insights/\",\n \"inventory\": \"/api/v2/inventories/1/\",\n \"inventory_sources\": \"/api/v2/hosts/18/inventory_sources/\",\n \"job_events\": \"/api/v2/hosts/18/job_events/\",\n \"job_host_summaries\": \"/api/v2/hosts/18/job_host_summaries/\",\n \"smart_inventories\": \"/api/v2/hosts/18/smart_inventories/\",\n \"variable_data\": \"/api/v2/hosts/18/variable_data/\"\n },\n \"summary_fields\": {\n \"groups\": {\n \"count\": 0,\n \"results\": []\n },\n \"inventory\": {\n \"description\": \"\",\n \"has_active_failures\": false,\n \"has_inventory_sources\": false,\n \"hosts_with_active_failures\": 0,\n \"id\": 1,\n \"inventory_sources_with_failures\": 0,\n \"kind\": \"\",\n \"name\": \"test-inv\",\n \"organization_id\": 1,\n \"total_groups\": 0,\n \"total_hosts\": 0,\n \"total_inventory_sources\": 0\n },\n \"recent_jobs\": [],\n \"user_capabilities\": {\n \"delete\": true,\n \"edit\": true\n }\n },\n \"type\": \"host\",\n \"url\": \"/api/v2/hosts/18/\",\n \"variables\": \"\"\n }\n ]\n}", "latency": 0, "statusCode": 200, "label": "", @@ -46,7 +46,7 @@ "responses": [ { "uuid": "158d9bce-bc86-4411-8977-afac4a1eaedd", - "body": "{\n \"count\": 1,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"results\": [\n {\n \"allow_simultaneous\": false,\n \"artifacts\": {},\n \"canceled_on\": null,\n \"controller_node\": \"\",\n \"created\": \"2018-02-01T08:00:00.000000Z\",\n \"description\": \"\",\n \"diff_mode\": false,\n \"elapsed\": 0,\n \"execution_node\": \"\",\n \"extra_vars\": \"{}\",\n \"failed\": false,\n \"finished\": null,\n \"force_handlers\": false,\n \"forks\": 0,\n \"id\": 1,\n \"instance_group\": null,\n \"inventory\": null,\n \"job_explanation\": \"\",\n \"job_slice_count\": 1,\n \"job_slice_number\": 0,\n \"job_tags\": \"\",\n \"job_template\": 1,\n \"job_type\": \"run\",\n \"launch_type\": \"manual\",\n \"limit\": \"\",\n \"modified\": \"2018-02-01T08:00:00.000000Z\",\n \"name\": \"\",\n \"organization\": null,\n \"passwords_needed_to_start\": [],\n \"playbook\": \"\",\n \"project\": null,\n \"related\": {\n \"activity_stream\": \"/api/v2/jobs/1/activity_stream/\",\n \"cancel\": \"/api/v2/jobs/1/cancel/\",\n \"create_schedule\": \"/api/v2/jobs/1/create_schedule/\",\n \"credentials\": \"/api/v2/jobs/1/credentials/\",\n \"job_events\": \"/api/v2/jobs/1/job_events/\",\n \"job_host_summaries\": \"/api/v2/jobs/1/job_host_summaries/\",\n \"job_template\": \"/api/v2/job_templates/1/\",\n \"labels\": \"/api/v2/jobs/1/labels/\",\n \"notifications\": \"/api/v2/jobs/1/notifications/\",\n \"relaunch\": \"/api/v2/jobs/1/relaunch/\",\n \"stdout\": \"/api/v2/jobs/1/stdout/\",\n \"unified_job_template\": \"/api/v2/job_templates/1/\"\n },\n \"scm_branch\": \"\",\n \"scm_revision\": \"\",\n \"skip_tags\": \"\",\n \"start_at_task\": \"\",\n \"started\": null,\n \"status\": \"new\",\n \"summary_fields\": {\n \"credentials\": [],\n \"job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\"\n },\n \"labels\": {\n \"count\": 0,\n \"results\": []\n },\n \"unified_job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\",\n \"unified_job_type\": \"job\"\n },\n \"user_capabilities\": {\n \"delete\": true,\n \"start\": false\n }\n },\n \"timeout\": 0,\n \"type\": \"job\",\n \"unified_job_template\": 1,\n \"url\": \"/api/v2/jobs/1/\",\n \"use_fact_cache\": false,\n \"verbosity\": 0,\n \"webhook_credential\": null,\n \"webhook_guid\": \"\",\n \"webhook_service\": \"\"\n }\n ]\n}", + "body": "{{setVar 'datejob1' (dateTimeShift date=(now) format='yyyy-MM-dd\\'T\\'HH:mm:ss.SSSSSS\\'Z' days=-1 hours=1)}}\n{{setVar 'datejob2' (dateTimeShift date=(now) format='yyyy-MM-dd\\'T\\'HH:mm:ss.SSSSSS\\'Z' days=-2 hours=1)}}\n{\n \"count\": 2,\n \"next\": {{#if (lt (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"previous\": {{#if (gte (queryParam 'page') 2)}}\"/api/v2/unified_jobs\"{{else}}null{{/if}},\n \"results\": [\n {\n \"allow_simultaneous\": false,\n \"artifacts\": {},\n \"canceled_on\": null,\n \"controller_node\": \"\",\n \"created\": \"{{getVar 'datejob1'}}\",\n \"description\": \"\",\n \"diff_mode\": false,\n \"elapsed\": 0,\n \"execution_node\": \"\",\n \"extra_vars\": \"{}\",\n \"failed\": false,\n \"finished\": \"{{getVar 'datejob1'}}\",\n \"force_handlers\": false,\n \"forks\": 0,\n \"id\": 1,\n \"instance_group\": null,\n \"inventory\": null,\n \"job_explanation\": \"\",\n \"job_slice_count\": 1,\n \"job_slice_number\": 0,\n \"job_tags\": \"\",\n \"job_template\": 1,\n \"job_type\": \"run\",\n \"launch_type\": \"manual\",\n \"limit\": \"\",\n \"modified\": \"{{getVar 'datejob1'}}\",\n \"name\": \"First job\",\n \"organization\": null,\n \"passwords_needed_to_start\": [],\n \"playbook\": \"\",\n \"project\": null,\n \"related\": {\n \"activity_stream\": \"/api/v2/jobs/1/activity_stream/\",\n \"cancel\": \"/api/v2/jobs/1/cancel/\",\n \"create_schedule\": \"/api/v2/jobs/1/create_schedule/\",\n \"credentials\": \"/api/v2/jobs/1/credentials/\",\n \"job_events\": \"/api/v2/jobs/1/job_events/\",\n \"job_host_summaries\": \"/api/v2/jobs/1/job_host_summaries/\",\n \"job_template\": \"/api/v2/job_templates/1/\",\n \"labels\": \"/api/v2/jobs/1/labels/\",\n \"notifications\": \"/api/v2/jobs/1/notifications/\",\n \"relaunch\": \"/api/v2/jobs/1/relaunch/\",\n \"stdout\": \"/api/v2/jobs/1/stdout/\",\n \"unified_job_template\": \"/api/v2/job_templates/1/\"\n },\n \"scm_branch\": \"\",\n \"scm_revision\": \"\",\n \"skip_tags\": \"\",\n \"start_at_task\": \"\",\n \"started\": null,\n \"status\": \"new\",\n \"summary_fields\": {\n \"credentials\": [],\n \"job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\"\n },\n \"labels\": {\n \"count\": 0,\n \"results\": []\n },\n \"unified_job_template\": {\n \"description\": \"\",\n \"id\": 1,\n \"name\": \"\",\n \"unified_job_type\": \"job\"\n },\n \"user_capabilities\": {\n \"delete\": true,\n \"start\": false\n }\n },\n \"timeout\": 0,\n \"type\": \"job\",\n \"unified_job_template\": 1,\n \"url\": \"/api/v2/jobs/1/\",\n \"use_fact_cache\": false,\n \"verbosity\": 0,\n \"webhook_credential\": null,\n \"webhook_guid\": \"\",\n \"webhook_service\": \"\"\n },\n {\n \"allow_simultaneous\": false,\n \"artifacts\": {},\n \"canceled_on\": null,\n \"controller_node\": \"\",\n \"created\": \"{{getVar 'datejob2'}}\",\n \"description\": \"\",\n \"diff_mode\": false,\n \"elapsed\": 0,\n \"execution_node\": \"\",\n \"extra_vars\": \"{}\",\n \"failed\": false,\n \"finished\": \"{{getVar 'datejob2'}}\",\n \"force_handlers\": false,\n \"forks\": 0,\n \"id\": 2,\n \"instance_group\": null,\n \"inventory\": null,\n \"job_explanation\": \"\",\n \"job_slice_count\": 1,\n \"job_slice_number\": 0,\n \"job_tags\": \"\",\n \"job_template\": 2,\n \"job_type\": \"run\",\n \"launch_type\": \"manual\",\n \"limit\": \"\",\n \"modified\": \"{{getVar 'datejob2'}}\",\n \"name\": \"Second job\",\n \"organization\": null,\n \"passwords_needed_to_start\": [],\n \"playbook\": \"\",\n \"project\": null,\n \"related\": {\n \"activity_stream\": \"/api/v2/jobs/2/activity_stream/\",\n \"cancel\": \"/api/v2/jobs/2/cancel/\",\n \"create_schedule\": \"/api/v2/jobs/2/create_schedule/\",\n \"credentials\": \"/api/v2/jobs/2/credentials/\",\n \"job_events\": \"/api/v2/jobs/2/job_events/\",\n \"job_host_summaries\": \"/api/v2/jobs/2/job_host_summaries/\",\n \"job_template\": \"/api/v2/job_templates/2/\",\n \"labels\": \"/api/v2/jobs/2/labels/\",\n \"notifications\": \"/api/v2/jobs/2/notifications/\",\n \"relaunch\": \"/api/v2/jobs/2/relaunch/\",\n \"stdout\": \"/api/v2/jobs/2/stdout/\",\n \"unified_job_template\": \"/api/v2/job_templates/2/\"\n },\n \"scm_branch\": \"\",\n \"scm_revision\": \"\",\n \"skip_tags\": \"\",\n \"start_at_task\": \"\",\n \"started\": null,\n \"status\": \"new\",\n \"summary_fields\": {\n \"credentials\": [],\n \"job_template\": {\n \"description\": \"\",\n \"id\": 2,\n \"name\": \"\"\n },\n \"labels\": {\n \"count\": 0,\n \"results\": []\n },\n \"unified_job_template\": {\n \"description\": \"\",\n \"id\": 2,\n \"name\": \"\",\n \"unified_job_type\": \"job\"\n },\n \"user_capabilities\": {\n \"delete\": true,\n \"start\": false\n }\n },\n \"timeout\": 0,\n \"type\": \"job\",\n \"unified_job_template\": 2,\n \"url\": \"/api/v2/jobs/2/\",\n \"use_fact_cache\": false,\n \"verbosity\": 0,\n \"webhook_credential\": null,\n \"webhook_guid\": \"\",\n \"webhook_service\": \"\"\n }\n ]\n}", "latency": 0, "statusCode": 200, "label": "", diff --git a/tests/apps/automation/ansible/tower/jobs.robot b/tests/apps/automation/ansible/tower/jobs.robot index f99c2ab70..c9b44b096 100644 --- a/tests/apps/automation/ansible/tower/jobs.robot +++ b/tests/apps/automation/ansible/tower/jobs.robot @@ -32,16 +32,18 @@ jobs ${tc} Ctn Run Command And Check Result As Strings ${command} ${expected_result} Examples: tc extraoptions expected_result -- - ... 1 --filter-name='' OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 2 --filter-name=toto OK: Jobs total: 0, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=0;;;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 + ... 1 --filter-name='' OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 2 --filter-name=First job OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 ... 3 --filter-name=toto --critical-total=1:1 CRITICAL: Jobs total: 0 | 'jobs.total.count'=0;;1:1;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 - ... 4 --filter-name='' --critical-total=1:1 CRITICAL: Jobs total: 2 | 'jobs.total.count'=2;;1:1;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 5 --filter-name='' --critical-total=2:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;2:2;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 6 --critical-total=2:1 CRITICAL: Jobs total: 2 | 'jobs.total.count'=2;;2:1;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 7 --filter-name='' --display-failed-jobs OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 8 --filter-name='' --warning-total=1:1 WARNING: Jobs total: 2 | 'jobs.total.count'=2;1:1;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 9 --filter-name='' --warning-total=2:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;2:2;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 4 --filter-name='' --critical-total=1:1 CRITICAL: Jobs total: 4 | 'jobs.total.count'=4;;1:1;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 5 --filter-name='' --critical-total=4:4 OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;;4:4;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 6 --critical-total=4:3 CRITICAL: Jobs total: 4 | 'jobs.total.count'=4;;4:3;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 7 --filter-name='' --display-failed-jobs OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 8 --filter-name='' --warning-total=1:1 WARNING: Jobs total: 4 | 'jobs.total.count'=4;1:1;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 9 --filter-name='' --warning-total=4:4 OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;4:4;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 ... 10 --filter-name=toto --warning-total=1:1 WARNING: Jobs total: 0 | 'jobs.total.count'=0;1:1;;0; 'jobs.successful.count'=0;;;0;0 'jobs.failed.count'=0;;;0;0 'jobs.running.count'=0;;;0;0 'jobs.canceled.count'=0;;;0;0 'jobs.pending.count'=0;;;0;0 'jobs.default.count'=0;;;0;0 - ... 11 --warning-total=1:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;1:2;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 12 --warning-total=2:1 WARNING: Jobs total: 2 | 'jobs.total.count'=2;2:1;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 - ... 13 --critical-total=1:2 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;1:2;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 11 --warning-total=3:4 OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;3:4;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 12 --warning-total=4:3 WARNING: Jobs total: 4 | 'jobs.total.count'=4;4:3;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 13 --critical-total=3:4 OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;;3:4;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4 + ... 14 --filter-time=24 OK: Jobs total: 2, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=2;;;0; 'jobs.successful.count'=0;;;0;2 'jobs.failed.count'=0;;;0;2 'jobs.running.count'=0;;;0;2 'jobs.canceled.count'=0;;;0;2 'jobs.pending.count'=0;;;0;2 'jobs.default.count'=0;;;0;2 + ... 15 --filter-time=48 OK: Jobs total: 4, successful: 0, failed: 0, running: 0 | 'jobs.total.count'=4;;;0; 'jobs.successful.count'=0;;;0;4 'jobs.failed.count'=0;;;0;4 'jobs.running.count'=0;;;0;4 'jobs.canceled.count'=0;;;0;4 'jobs.pending.count'=0;;;0;4 'jobs.default.count'=0;;;0;4