Comments (7)
Hi, sorry about my delayed response. I did see the updated exe file, but was planning to roll it out and test it this weekend.. anyhow, with the help of a good cup of coffee I did it this morning and I can report that it works as intended now! I removed the [[proccess.override]]
command, and the Telegraf was able to append the host name tag as defined in my global agent!
Thank you so much for the help and taking the time to update the application
from coretemptelegraf.
Thanks for reaching out!
To answer your first question as to why I decided to add the host directly, the simple answer is that I thought I needed to. I kinda backed into using Telegraf by my desire to push data into influxdb and visualize in Grafana. So my experience was seeing the data in influxdb and Grafana, and all measurements had a host
tag. When I developed CoreTempTelegraf, I wanted to be consistent and so I included a host
tag. It didn't occur to me at all that the tag would (or could) be added automatically by Telegraf.
Unfortunately I don't have an answer to your second question. I'm just not well-versed in all the particulars of Telegraf.
Can you elaborate on exactly how you are overriding the host? Is it with the hostname
setting in the [agent]
section?
from coretemptelegraf.
Thanks for the reply! sounds like you and I have the same need to graph the heck out of the computer parameters when available! I have a couple of Ubutu computers, a Windows Gaming machine and several VM with various OSs and I use Telegraf to capture metrics. I do use the [agent]
and hostname
(say NewName) global options in Telegraf where I rely on my predetermined hostname rather than going off the computer name and that is how I have created all my graphs in Grafana.
In trying to workaround the fact that your application embeds the computer name as the hostname, I successfully used the tagexclude = ["host"]
under the [[inputs.exec]]
in telegraf and it does remove the host tag from that data, but then I tried using the command [inputs.exec.tags]
with host = "NewName"
(under [[inputs.exec]] )
to add my custom name and could not get it to work.
I even tried using [[processors.strings.replace]]
with the tag_key = "host" , old = "ComputerName" new = "NewName"
and did not work either.
Don't get me wrong, your application works flawlessly and I can use Grafana to graph the datapoint, it's just because the application is using the computer name as the hostname, instead of my predefined name, then my automated graphs get broken. I was wondering if you had to embed the hostname as you did because you had errors or issues with telegraf, but it seems like you did not.
So, at this point I have the graphs that I need (manually created) and will live with that. I will keep trying to see if I find a way to replace, rename or update the hostname, but won't spend too much time on it. I will report back if I am sucsesful.
Thanks!
from coretemptelegraf.
I'm going to play around with removing the host
tag from CoreTempTelegraf... if I'm thinking about this right, I'm guessing Telegraf will add my computer name as the hostname in the absence of an host
tag. If that's true, I'll go ahead and push a new version that omits the host tag, as doing so shouldn't have any impact on users.
I'll let you know what I find. Thanks again for bringing this to my attention!
from coretemptelegraf.
Ok, so late last night I found this post: link with that in mind, I added the following to the end of my Telegraf config:
[[processors.override]]
namepass = ["coretemp_cpu"]
[processors.override.tags]
host = "NewName"
After restarting the service, all of the new data has the host name tag "NewName" and not the "ComputerName". I wanted to have a few hours of logging before replying back just to make sure I had a clean cut.. I can report that everything seems to work as I intended it now! no more data values with the computer name host tag!
I will say, this is not the most elegant of solutions as it means one has to keep track of the host name in two different places (the global agent tag, and this override) but it does the job. Updating the application will be considered a nice to have :-)
For now I think we have a solution, and I am happy with the results.
Thanks for all the help and great application!
from coretemptelegraf.
I did some testing with removing the hard-coded host
value, and everything functioned identically. Telegraf inserted the host
tag automatically, defaulted to my Computer Name (as I do not have an override value set).
So, I have updated and published the source code, and I have published version 1.02 of the executable on my website at https://tomk.xyz/k/CoreTempTelegraf
This should clean things up for you. Thanks again for bringing this to my attention!
from coretemptelegraf.
@funky28 I just want to make sure you saw that I updated the code to no longer include a hard-coded host!
from coretemptelegraf.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coretemptelegraf.