So I have a scenario where telegraf is not able to complete data collection(cpu and memory usage) in a given interval (60 seconds or 30 seconds). This happens when another process is taking up the bigger chunk of machine resources like cpu and memory. That puts telegraf on the lower priority list for processes. Is there a way to force telegraf to run with higher priority so that it can collect metrics about the abnormal behavior of other process when they are misbehaving instead of slowly down because of that behavior and loose system metrics.
You could do something like:
sudo nice -n -10 telegraf
Okay so when I read the documentation of nice I understand -10 is one of the higher priority levels with -19 I guess being the highest. So how do we decide on a number like -10, is there anything I should consider before using it?