Optional Config

Write Metric FQNs to Local File

If you want to keep a local file with a list of metric FQNs (fully qualified names), you can do so by updating the below lines in your netuitive-agent.conf file, under the [[NetuitiveHandler]]. By default, this ability is set to False. When set to True, this file updates with any new FQNs as long as the agent is running.

If the agent is started and write_metric_fqns is set to True, the file is overwritten; it remains unchanged if set to False before starting the agent.

To Enable:

  1. Open your netuitive-agent.conf file.
  2. Change write_metric_fqns = False to True.
  3. Confirm your desired path (metric_fqns_path) for the file.
  4. Save.

Update the Hostname Manually

If you’re having issues with the default naming method or the hostname isn’t what you desire, you can manually set the hostname via the agent’s configuration file located at /opt/netuitive-agent/conf/netuitive-agent.conf. Consult the table below for more information.

Method Description Usage
smart The agent will initially try to use fqdn_short. If the fqdn_short value is “localhost”, the agent will use hostname_short. Smart is the default method. Do not make changes to this section of the configuration file to continue using it.
hardcoded Force a hardcoded hostname of your choosing. Uncomment the “hostname” setting and replace “my_custom_hostname” with your desired hostname. Keep in mind that periods are common separators.
fqdn There are three fqdn options: fqdn_short (similar to the value returned by the hostname -s command), fqdn (the fully qualified domain name), or fqdn_rev (the fully qualified domain name but reversed, e.g., com.example.www). Uncomment the “hostname_method” setting and replace “smart” with the desired fqdn setting e.g. hostname_method = fqdn_short or hostname_method = fqdn or hostname_method = fqdn_rev.
uname There are two uname options: uname_short (similar to the value returned by the “uname -n” command but only the first portion) or uname_rev (the value returned by the “uname -n” command but reversed, e.g., com.example.www. Uncomment the “hostname_method” setting and replace “smart” with the desired uname setting e.g. hostname_method = uname_short or hostname_method = uname_rev.
hostname There are three hostname options: hostname_short (the value returned by the hostname -s command), hostname (the full hostname value), or hostname_rev (the full hostname value but reversed, e.g., com.example.www). Uncomment the “hostname_method” setting and replace “smart” with the desired hostname setting e.g. hostname_method = hostname_short or hostname_method = hostname or hostname_method = hostname_rev.
shell Uses the string set in the hardcoded hostname variable as a shell command. The agent will use its output (with spaces trimmed from both ends) as the hostname. Setting up this method is a two step process. Uncomment the “hostname_method” setting and replace “smart” with “shell”. Uncomment the “hostname” setting and replace “my_custom_hostname” with your desired shell command. For example, with the following hostname config you can use the AWS metadata endpoint to retrieve the instanceId and append it to the hostname to ensure uniqueness: hostname = curl -sS “http://169.254.169.254/latest/meta-data/instance-id" | xargs echo “$HOSTNAME -”.