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

in_cpu or in_head: add cpu temperature? #308

Closed
mahdi-asadpour-rr opened this issue Jun 28, 2017 · 9 comments
Closed

in_cpu or in_head: add cpu temperature? #308

mahdi-asadpour-rr opened this issue Jun 28, 2017 · 9 comments

Comments

@mahdi-asadpour-rr
Copy link

CPU temperature is reported in "/sys/class/thermal/thermal_zone0/temp" (Linux), which is an important metric to monitor in embedded systems. Would it be possible to include this somehow?

  • include temperature in the in_cpu, OR

  • it's actually possible to use in_head on this file, but the read value is outputted as "string" and not "number", which makes it not usable to visualize in Kibana when output_es is used.

Thanks.

@edsiper
Copy link
Member

edsiper commented Jun 28, 2017

Actually reading from a file will be considered as a string. No workaround at the moment but I will flag this issue as an enhancement request to see how this can be accomplished in the future.

@edsiper
Copy link
Member

edsiper commented Jun 28, 2017

@nokute78 what about an option on in_head to force a atoll() over the read data ?

@nokute78
Copy link
Collaborator

@edsiper In my opinion, it will be nice to support "types" feature of parser like fluentd.

Because type casting is helpful for not only in_head but also other input plugins.

@edsiper
Copy link
Member

edsiper commented Jun 29, 2017

@nokute78 so for Parsers context it would be to add a new format(ter) backend-type, e.g:

  • Regex
  • JSON
  • Number (handle integer and double)

@nokute78
Copy link
Collaborator

I pushed #310 to update parser.

@edsiper It is different from parser of fluentd.
Could you check this?
http://docs.fluentd.org/v0.12/articles/parser_regexp#types

@mahdi-asadpour-rr
Copy link
Author

@nokute78 I can confirm that #310 -- adding types -- solves the issue/feature mentioned here.

@nokute78
Copy link
Collaborator

nokute78 commented Jul 3, 2017

@mahdi-asadpour-rr
Thank you for reporting.

@edsiper Could you review #310 ?

@edsiper
Copy link
Member

edsiper commented Jul 3, 2017

@nokute78 sure, shortly (~tomorrow)

@edsiper
Copy link
Member

edsiper commented Jul 4, 2017

thanks!, merged.

fixed.

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

3 participants