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

[storage::emc::datadomain::snmp::plugin] - mode(cleaning) : Bad status when is running #5339

Open
monsieurpouet opened this issue Dec 10, 2024 · 8 comments

Comments

@monsieurpouet
Copy link

Hi all !

Quick description

When i use the storage::emc::datadomain::snmp::plugin plugin with cleaning mode, I see a CRITICAL when the cleaning is running.

How to reproduce

Please provide below the initial conditions to reproduce the bug

  • Environment: Debian 11.11.
  • Version of the plugin: 20241107-1+deb11u1
  • Information about the monitored resource: EMC DataDomain DD6400 / Version: 7.10.1.10
  • Command line: /usr/lib/centreon/plugins//centreon_emc_datadomain.pl --plugin=storage::emc::datadomain::snmp::plugin --mode=cleaning --hostname=ip.ip.ip.ip --snmp-version='3' --snmp-community='lala' --snmp-username='user' --authprotocol='MD5' --authpassphrase='auth' --privprotocol='AES' --privpassphrase='priv' --warning-last-cleaning-execution='7' --critical-last-cleaning-execution='15' --debug

Expected result

OK: cleaning last execution: running | 'filesystems.cleaning.execution.last.days'=0d;0:192;0:215;0;
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = Cleaning: phase 5 of 6 (copy)

Actual result

CRITICAL: cleaning last execution: never | 'filesystems.cleaning.execution.last.days'=-1d;0:192;0:215;0;
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = Cleaning: phase 5 of 6 (copy)

Closing words

So when the cleaning is running, I shouldn't see a CRITICAL, but a OK status.

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

Thank you for your feedback. The plugin doesn't seem to take into account whether the cleaning last execution value is not a date. I'll have a look at what we can do :) (👍 for the debug OID it's perfect 👌 )

@monsieurpouet
Copy link
Author

Yop !

Thanks for your reply ! :)

@lucie-dubrunfaut
Copy link
Contributor

Can you test this proposed fix? #5346

@monsieurpouet
Copy link
Author

Re @lucie-dubrunfaut

Some information from my team^^ I think it's important

There is many step in the datadomain cleaning system. And, it's true, the "Copy" step is a step and in the output, we have the step description.

See the differents steps:

Pre-enumeration - enumerate the contents of the DDFS file system
Pre-merge - perform a DDFS index merge to ensure that the latest copy of index information is flushed to disk
Pre-filter - determine if there is duplicate data within the DDFS file system and if so where this is
Pre-select - determine which 4.5 Mb containers should be 'processed' by cleaning
Copy - physically extract live data from selected containers, write this to new containers, then delete selected containers
Summary - rebuild summary vectors (which are used as an optimization during ingestion of new data)

The copy moment is the fifth step.

IMO, if you change the code to catch just the copy step, I'll be back ahah
I think is more accurate to catch the other steps too

@lucie-dubrunfaut
Copy link
Contributor

Ok sorry my bad I wrote the fix too fast, I take your feedback into account and push another fix on this PR

@lucie-dubrunfaut
Copy link
Contributor

lucie-dubrunfaut commented Dec 12, 2024

I've modified the regex to catch :

  • current_phase = $1
  • total_phases = $2
  • phase_info = $3
    "running (phase $1 of $2 : $3)";
perl centreon_plugins.pl --plugin=storage::emc::datadomain::snmp::plugin --hostname=XXXX --snmp-version=2c --snmp-community=XXXX --snmp-port=XXXX --mode=cleaning --debug
OK: cleaning last execution: running (phase 5 of 6 : copy) | 'filesystems.cleaning.execution.last.days'=0d;;;0;
.1.3.6.1.4.1.19746.1.3.5.1.1.2.0 = Cleaning: phase 5 of 6 (copy)

Does it look better for you ?

@monsieurpouet
Copy link
Author

Awesome ! Thanks ! Ok for me :)

@lucie-dubrunfaut
Copy link
Contributor

Great I'll try to add this fix in the January release :)
In the meantime, if you need to, you can use the fix already available in the PR.

@lucie-dubrunfaut lucie-dubrunfaut changed the title [storage::emc::datadomain::snmp::plugin] : --mode=cleaning / Bad status when is running [storage::emc::datadomain::snmp::plugin] - mode(cleaning) : Bad status when is running Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants