Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide user feedback thu echo command #258

Merged
merged 2 commits into from
Dec 30, 2015
Merged

Conversation

qdelance
Copy link
Contributor

This PR adds information in the output in case of "non OK" status (last command + last echo command if provided in the scenario)

Note that the way to use "echo" in scenario is documented in WAA on doc-dev (not yet on documentation.centreon.com)

Output:

# Nouvelle sonde, scenario OK, sans echo
 ./centreon_plugins.pl  --plugin=apps::selenium::plugin --mode=scenario --selenium-hostname=192.168.56.211 --selenium-port=4444 --directory=/var/lib/centreon_waa --scenario=scenario-local --warning=15 --critical=20
OK: 7/7 steps (6.775s) | 'time'=6.775s;0:15;0:20;0; 'steps'=7;;;0;7 'availability'=100%;;;0;100

# Nouvelle sonde, scenario KO, sans echo
 ./centreon_plugins.pl  --plugin=apps::selenium::plugin --mode=scenario --selenium-hostname=192.168.56.211 --selenium-port=4444 --directory=/var/lib/centreon_waa --scenario=scenario-local --warning=15 --critical=20
CRITICAL: 5/7 steps (6.816s) - clickAndWait link=Srvices  | 'time'=6.816s;0:15;0:20;0; 'steps'=5;;;0;7 'availability'=71%;;;0;100

# Nouvelle sonde, scenario OK, avec echo
./centreon_plugins.pl  --plugin=apps::selenium::plugin --mode=scenario --selenium-hostname=192.168.56.211 --selenium-port=4444 --directory=/var/lib/centreon_waa --scenario=scenario-local-avec-echo --warning=15 --critical=20
OK: 11/11 steps (13.092s) | 'time'=13.092s;0:15;0:20;0; 'steps'=11;;;0;11 'availability'=100%;;;0;100

# Nouvelle sonde, scenario KO



, avec echo
 ./centreon_plugins.pl  --plugin=apps::selenium::plugin --mode=scenario --selenium-hostname=192.168.56.211 --selenium-port=4444 --directory=/var/lib/centreon_waa --scenario=scenario-local-avec-echo --warning=15 --critical=20
CRITICAL: 8/11 steps (2.359s) - clickAndWait link=Srvices  - Ouverture services | 'time'=2.359s;0:15;0:20;0; 'steps'=8;;;0;11 'availability'=72%;;;0;100

Also remove a Perl warning if no scenario file is given as param.

@garnier-quentin
Copy link
Contributor

First thanks. Two things. Prefer (= undef not needed):
my ($last_echo_msg, $last_cmd);

Second: Is it ok to display the echo even if it comes from X steps before ? You also need to care of "\n" or '|' in the echo.

@qdelance
Copy link
Contributor Author

PR updated with:

  • var declaration updated
  • regexp applied on echo content

garnier-quentin pushed a commit that referenced this pull request Dec 30, 2015
Provide user feedback thu echo command
@garnier-quentin garnier-quentin merged commit d63f7c0 into centreon:master Dec 30, 2015
Sims24 pushed a commit that referenced this pull request Jul 21, 2021
* fix(rn): centreon-ha release notes were not structured properly

* fixing release version number in french
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants