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

Create plugin to monitor host memory #7

Closed
atc0005 opened this issue Dec 30, 2020 · 4 comments · Fixed by #126
Closed

Create plugin to monitor host memory #7

atc0005 opened this issue Dec 30, 2020 · 4 comments · Fixed by #126

Comments

@atc0005
Copy link
Owner

atc0005 commented Dec 30, 2020

Unlike GH-5 which is intended to monitor a percentage of a set amount of memory across a cluster (e.g., are "we" within our leased memory range), this plugin is intended to monitor a specific host. This is intended to help identify hosts that are overburdened in a shared hosting environment where an automated rebalancing policy may not be in effect.

@atc0005 atc0005 added the host label Dec 30, 2020
@atc0005 atc0005 self-assigned this Dec 30, 2020
@atc0005
Copy link
Owner Author

atc0005 commented Dec 30, 2020

Note: This might be extended to cover host CPU usage as well, but the initial design is intended specifically for host memory monitoring.

@atc0005
Copy link
Owner Author

atc0005 commented Feb 4, 2021

Starting work on this.

From the doc.go file for the plugin-to-be:

In addition to reporting current host memory usage, this plugin also reports which VMs are running on the host along with their percentage of the total memory used.

Basically borrow the ideas from the datastore monitoring plugin, but specific to a single host.

Hopefully including the list of VMs (presumably sorted by memory usage) will come in handy to anyone receive an alert for host memory usage.

@atc0005
Copy link
Owner Author

atc0005 commented Feb 4, 2021

It would be good to include the number of VMs running on the host in the one-line summary. Due to access/permissions, the number will likely reflect only those VMs the service account executing the plugin has access to, but that's still useful.

If a service account is used by a cluster admin, they'll see the full number (and listing in the extended output), but if the service account is used by a team that is managing only a portion of the resources (e.g., a tenant leasing hosting capacity) they'll see the number and relevant VMs to them.

This seems to still be a useful thing.

@atc0005
Copy link
Owner Author

atc0005 commented Feb 4, 2021

TODO: Include HR version of host.Hardware.MemorySize in extended summary output.

atc0005 added a commit that referenced this issue Feb 4, 2021
As with several other plugins in this project, this one borrows
heavily from existing projects. In particular, this plugin is based
heavily on the datastore usage plugin while borrowing elements from
other recent plugins. Small adjustments were made to shared code in
order to support the new plugin.

In short, this plugin monitors the memory use on a specified host.
This plugin also reports which powered on and powered off VMs are
attached to the host along with the memory consumed by each, including
the overall percentage of the host's memory.

Doc updates have been applied, example usage has been added, including
a command definition "contrib" file illustrating how the plugin would
be referenced within a production Nagios configuration.

refs GH-7
atc0005 added a commit that referenced this issue Feb 4, 2021
As with several other plugins in this project, this one borrows
heavily from existing projects. In particular, this plugin is based
heavily on the datastore usage plugin while borrowing elements from
other recent plugins. Small adjustments were made to shared code in
order to support the new plugin.

In short, this plugin monitors the memory use on a specified host.
This plugin also reports which powered on and powered off VMs are
attached to the host along with the memory consumed by each, including
the overall percentage of the host's memory.

Doc updates have been applied, example usage has been added, including
a command definition "contrib" file illustrating how the plugin would
be referenced within a production Nagios configuration.

refs GH-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant