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

export the number of CPU cores #3186

Closed
sitanxin opened this issue Dec 13, 2016 · 4 comments
Closed

export the number of CPU cores #3186

sitanxin opened this issue Dec 13, 2016 · 4 comments
Labels

Comments

@sitanxin
Copy link

As discuss, would you help to provide the export the number of CPU cores in metribeat?

For confirmed bugs, please report:

@sitanxin
Copy link
Author

And also, can it export the OS version or allow to run the command in the beat? like cat /etc/redhat-release ?

@martinscholz83
Copy link
Contributor

Hi @ruflin, @monicasarbu. What do you think of if we add a simple helper function

func GetCores() int {
	cores := runtime.NumCPU()
	return cores
}

my problem currently is where to store this information. Into every fetch? I dont think this is a good solution. Because it is more of an onetime value. Is there a place to store such values?

@ruflin
Copy link
Member

ruflin commented Dec 14, 2016

I suggest to put it under system.cpu.cores: 4. We do not have a special place for values that do not change that often. Such values should also compress quite well. I like the idea of a helper function.

@maddin2016 Do you plan to do a PR for it?

@sitanxin Can you open a second feature request for the os version as this is a different request?

@martinscholz83
Copy link
Contributor

Ok, then i open a PR.

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

4 participants