# Upgrading SNMP Definition Files

ElastiFlow's SNMP-based products (NetObserv SNMP and NetObserv SNMP Trap) use ElastiFlow's '[SNMP definition](https://github.com/elastiflow/snmp/releases)' files which are publicly available.

* Because of these files, you can customize how our products parse and enrich SNMP data. This is an intentional feature of our SNMP-based products.
* Users must manually take steps whenever ElastiFlow makes updates to these files. This is a part of how we can support such high customization.

{% hint style="danger" %}
Always read the release notes prior to using any SNMP definitions to ensure that they will work with the version of the NetObserv that you are using.
{% endhint %}

### Installation

Anytime you install NetObserv SNMP or NetObserv SNMP Trap, those products will come shipped with the latest versions of the snmp definition files at the time of release. When you install NetObserv using linux packages (deb or rpm), and if there are no SNMP definition files in your system already, the installer will unpack the definition files shipped with the installer and unpack them there. There is no special action required for installing NetObserv.

The default location for these SNMP definitions is `/etc/elastiflow/snmp`.

### Getting Updates

Whenever ElastiFlow updates any of those SNMP definition files, NetObserv products will *not* replace any existing yml definition files with the updated ones. This prevents accidentally deleting customizations users might have made.

#### Docker Image Notes

If you use the Docker image of NetObserv, those images technically include the latest versions of the snmp definition files when you upgrade NetObserv. If you change the version of the image you are running, the new image will already have the updated SNMP definition files.

However, in practice, many users will use volume mounts so that the Docker images are pulling the SNMP definition files from the host machine. In those situations, users will *not* automatically receive updates to any changes to SNMP definition files. You will have to manually update SNMP definition files on your host using one of the below options.

#### Option 1. Manual Downloads

1. View the [changelog of NetObserv](https://github.com/elastiflow/documentation/blob/main/docs/changelog/README.md) to see if there are any changes to SNMP definitions included in the newer NetObserv version. If there are no changes to SNMP definitions, you do not need to take any further steps here.
2. Download the latest zipped copy of [SNMP definition files](https://github.com/elastiflow/snmp/releases).
3. Unpack those contents on your machine running NetObserv, and then overwrite existing files with the new ones.

#### Option 2. Keeping Up to Date with `git`

Since the SNMP definitions are made available in a GitHub repository, `git` can be used to simplify deployment and updates.

**Setting Up SNMP Definition Files to Use Git**

1. Backup any existing contents of SNMP definition files.

```shell
cp -R /etc/elastiflow/snmp /etc/elastiflow/backup-snmp
```

2. Run the following commands to deploy the definitions using `git`:

```shell
cd /etc/elastiflow
git clone https://github.com/elastiflow/snmp.git
```

3. Make any desired customizations. For example, you might add new files inside `/etc/elastiflow/snmp`.
4. Locally commit changes anytime you make local changes.

```shell
cd /etc/elastiflow/snmp
git add -A .
git commit -m "Made local customizations to snmp definition files."
```

**Syncing SNMP Definition Files to Use Git**

To update the definitions to the latest in the `main` branch simply run the following:

```shell
cd /etc/elastiflow/snmp
git pull
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elastiflow.com/additional-resources-reference-articles/faq/def_download.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
