Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Prerequisites

  • Server or Virtual Machine (VM) where Telegraf will be installed.

  • Network devices with SNMP v3 enabled. (v2 can also be used, just comment out all lines related to v3 configuration).

  • Required authentication and encryption credentials.

Step 1: Download and Install Telegraf

  1. Download Telegraf from InfluxData's official website.

  2. Install Telegraf by following the on-screen instructions.

  3. Confirm the installation by running:

    telegraf --version

Step 2: Configure SNMP Monitoring

  1. Obtain the SNMP v3 configuration file (eyer_telegraf_snmp_generic_v3.conf).

  2. Open the configuration file in a text editor.

  3. Edit the following fields with your SNMP credentials:

    sec_name = "your_username"
    auth_protocol = "SHA"
    auth_password = "your_auth_password"
    sec_level = "authPriv"
    priv_protocol = "AES"
    priv_password = "your_private_password"
    agents = [ "udp://192.168.1.1" ]
  4. Ensure the protocols match your device’s settings (options are listed in the config file).

  5. Save the file.

Step 3: Install Net-SNMP for MIB Lookups

Some operating systems can do MIB lookup without any additional components. You can try to run Telegraf without completing the steps in this section. If you experience any errors, complete section 3.

  1. Download Net-SNMP from SourceForge. As a recommended alternative, Gosmi can be used instead. Please see more information in this article.

  2. Choose the appropriate version (x64 or x86).

  3. Ensure you select the "with Windows extensions" option during installation.

  4. After installation, restart the command prompt and verify the installation by running:

    snmptranslate
    • If the command returns usage instructions, the installation was successful.

    • If not, reinstall Net-SNMP with administrative privileges.

Step 4: Run Telegraf with SNMP Configuration

  1. Open PowerShell or Command Prompt.

  2. Navigate to the Telegraf installation directory (install folder might be different):

    cd "C:\Program Files\InfluxData\telegraf\telegraf-1.33.1"
  3. Run Telegraf with the SNMP configuration file:

    .\telegraf.exe --config eyer_telegraf_snmp_generic_v3.conf
  4. If everything is configured correctly, Telegraf should start collecting SNMP data.

  5. Check for any error messages. If you see:

    Error running agent: could not initialize input inputs.snmp: initializing table Octets_field: initializing field: translating: exec: "snmptranslate": executable file not found in %PATH%
  6. Register the Telegraf agent as a service and start it(see instructions per OS). With Windows use

    .\telegraf.exe --config "C:\Program Files\InfluxData\telegraf\eyer_telegraf_snmp_generic_v3.conf

Step 5: Verify Data Collection

  • If Telegraf is running without errors, wait and check if SNMP data is being collected.

  • You can confirm this by monitoring the logs in real-time.

Final Steps

  • If successful, obtain access credentials for Eyer to visualize the collected SNMP data.

  • Ensure the system continues to collect data for a sufficient period before the planned demo.

Troubleshooting

  • If Net-SNMP is not working:

    • Check if it's listed under "Programs and Features."

    • Reinstall it with administrative privileges.

  • If Telegraf doesn’t start correctly:

    • Verify all credentials in the config file.

    • Ensure Telegraf and Net-SNMP paths are correctly set in the system.

  • Restart the VM if necessary.


This guide provides a structured approach to setting up SNMP monitoring with Telegraf. If issues persist, recheck the configuration and installation steps, ensuring all dependencies are correctly installed.

  • No labels