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

Instance metrics #148

Closed
turtle0x1 opened this issue Feb 8, 2020 · 1 comment
Closed

Instance metrics #148

turtle0x1 opened this issue Feb 8, 2020 · 1 comment
Labels
Milestone

Comments

@turtle0x1
Copy link
Owner

turtle0x1 commented Feb 8, 2020

Now that snap exposes the LXCFS key to enable load averages we can scrape loadavgs from containers,

The client implementation for scarping the instance metrics will be written in python and should require no external dependencies, so it can be injected through user.vendor-data and not require an internet connection.

My initial implementation its not expansible at the moment (which would allow custom templates for other services) but that's not the reason the client really exists (if LXD exported loadavgs I wouldn't even write a client program)

The back-end currently has Instance_Mertic_Types & Instance_Metric_Values, which is some what expansible,

Im currently not making an attempt to track the containers we are trying to read from or the type of metrics it will export instead opting for the server to tell us,

I dont store what we are actually tracking because we might miss an operation like a rename or the user might change something outside of LxdMosaics control

Push

The container has a network and can reach the LxdMosaic instance at the specified Instance IP setting.

It will push its results over https to the server and won't require LxdMosaic to do anything other than process the request (obviously where this app doesn't require auth, its pretty easy to poison the metrics, but you have bigger problems than that)

Pull

If the container doesn't have network access or can't reach the LxdMosaic instance then instead LxdMosaic will "reach into" the container and collect the data from the path /etc/lxdMosaic/offlineLogs, enviroment.lxdMosaicPullMetrics set in a profile will cause LxdMosaic to scan all instances attached to the profile and try to read log data

@turtle0x1
Copy link
Owner Author

turtle0x1 commented Jun 19, 2020

Closed in ac85dcd

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

No branches or pull requests

1 participant