canonical / charm-openstack-service-checks

Collection of Nagios checks and other utilities that can be used to verify the operation of an OpenStack cluster
0 stars 4 forks source link

[plugin] report DOWN port status as warning #183

Closed pponnuvel closed 2 weeks ago

pponnuvel commented 2 weeks ago

This switches port status to WARNING from CRITICAL if their instances were shutdown.

Closes: #179

pponnuvel commented 2 weeks ago

The change in output would be:

Before:

# /usr/local/lib/nagios/plugins/check_resources.py port --all
CRITICAL: ports 1/3 are DOWN, 2/3 passed
port 'f1ceccf6-35de-455d-bbb1-92abeab8959d' is in DOWN status
port 'b7460488-5a04-43c7-921a-d569c9adab23' is in ACTIVE status
port '598c04a1-35cd-4409-9ce2-5f36e7fb583e' is in ACTIVE status

After:

# /usr/local/lib/nagios/plugins/check_resources.py port --all
WARNING: ports 1/3 in UNKNOWN, 2/3 passed
port 'f1ceccf6-35de-455d-bbb1-92abeab8959d' is in SHUTOFF status
port 'b7460488-5a04-43c7-921a-d569c9adab23' is in ACTIVE status
port '598c04a1-35cd-4409-9ce2-5f36e7fb583e' is in ACTIVE status

The instance of the port f1ceccf6-35de-455d-bbb1-92abeab8959d was shutdown manually.

pponnuvel commented 2 weeks ago

This particular change was requested by a customer and it made sense to me.

With that said, wouldn't be the case the we drop the check ports at all on o-s-c?

I am not sufficiently knowledgeable on OpenStack to suggest such a change :) It's probably best decided by OpenStack Eng team, and the users/operators who deal with day-to-day operations.

gabrielcocenza commented 2 weeks ago

/canonical/self-hosted-runners/run-workflows 3af5f37709cc43b34fb3424b9e35150cbf875cf6

rgildein commented 2 weeks ago

Hi @pponnuvel, this PR is ready to be merged since I triggered CI, however you need to singe your commits and push it again.

pponnuvel commented 2 weeks ago

Thanks, @rgildein. I have now rebased from main and removed the merge from Gabriel.

pponnuvel commented 2 weeks ago

@rgildein Needs one more:

/canonical/self-hosted-runners/run-workflows a3589ec82d2b967f13a3d6c8b2d0b0270d0ec031

rgildein commented 2 weeks ago

Thanks, @rgildein. I have now rebased from main and removed the merge from Gabriel.

Your commits are still not singed. Please follow this instructions https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits.

pponnuvel commented 2 weeks ago

Ah, I see. Done now. Thanks, @rgildein !