Upgrading Osquery Agent Using API

Osquery Upgrade via API

Introduction
Uptycs provides an Osquery upgrade API call (assets/upgradeOsquery) to assist you with upgrading the Osquery agent on your assets along with the GUI functionality.

Different Ways To Update Assets:
1.) Updating assets manually:
- You can update the Uptycs osquery agent individually on the asset or on a list of asset using the "assetIds" parameter. The call would look like this.
  1. {
        "assetIds": [
            "12c8900f-beb3-1140-9c09-bcae9aaba69c"
        ],
        "osqVersion": "5.10.2.16-Uptycs-Protect",
        "upgradeState": true
    }


2.) Using Asset Group tags:
- Using the above method can be useful for testing or if you want to upgrade a one-off agent. However, the above method is not scalable. To upgrade a wider set of fleet, we can make use of asset group tags or asset tags in the API calls using the "tags" parameter. In this section, we will look at the asset group tags. When an asset group gets created, a corresponding asset group tag also gets created which could be leveraged in this API call. An example call is shown below.
  1. {
        "tags":[{"key":"asset-group"}, {"value":"enrolling"}],
        "osqVersion": "5.10.2.16-Uptycs-Protect",
        "upgradeState": true
    }


3.) Asset Tags:
- Similar to asset group tags, asset tags can also be leveraged to update the Uptycs osquery agent on the assets associated with those tags. Asset tags could be created to associate various set of assets having a common characteristic. For example:- assets sharing common naming convention like assets whose hostname starts with the word "DESKTOP",  assets running a particular process like "nginx", etc. An example screenshot of an asset tag rule tagging assets having "DESKTOP" in their hostname is shown below.


Now, you can use the asset tag to upgrade the Uptycs osquery agent on the assets associated with this tag as shown below.
  1. {
        "tags":[{"key":"DESKTOP-ASSETS"}],
        "osqVersion": "5.10.2.16-Uptycs-Protect",
        "upgradeState": true
    }



4.) All assets:
- If you want to upgrade the Uptycs osquery agent on all the assets using this API, you can do the same by leveraging the "all" tag.  A sample call for the same is shown below.
  1. {
        "tags":[{"key":"all"}],
        "osqVersion": "5.10.2.16-Uptycs-Protect",
        "upgradeState": true
    }


Example Scenario: You have different kind of assets like lab assets, developer laptops, production servers, etc. in which you want to upgrade the osquery agent in phased manner like initially upgrading lab assets then upgrading developer machines and at last upgrading the production servers. You can achieve this using this API call as well. A sample call is shown below.
  1. {
        "tags":[{"key":"lab-assets"}],
        "osqVersion":"5.10.2.16-Uptycs-Protect",
        "upgradeAfterTime":"2024-03-24T14:15:22z",
        "tags":[{"key":"developer-laptops"}],
        "osqVersion":"5.10.2.16-Uptycs-Protect",
        "upgradeAfterTime":"2024-03-31T14:15:22z",
        "tags":[{"key":"developer-laptops"}],
        "osqVersion":"5.10.2.16-Uptycs-Protect",
        "upgradeAfterTime":"2024-04-07T14:15:22z"
    }


Please specify the Osquery version to which you want the Uptycs agent to be upgraded to, else it will be upgraded to the latest version which may not be the desired version by you.


    • Related Articles

    • Uptycs Cloud 144 Release Notes

      Uptycs Cloud 144 Release Notes Disclaimer: This document is for information purposes only. It is subject to change due to ongoing product development by Uptycs. You should not interpret this information as a binding commitment from Uptycs. Without ...
    • Uptycs Cloud 146 Release Notes

      Disclaimer: This document is for information purposes only. It is subject to change due to ongoing product development by Uptycs. You should not interpret this information as a binding commitment from Uptycs. Without prior written consent from ...
    • Install Uptycs Protect (AIX) without process blocking

      The below method of procedure describes the step by step process to install Uptycs Protect with remediation enabled and process blocking disabled on AIX endpoints. ====================================================================== Important Note: ...
    • Install Uptycs Protect on MacOS by MDMDeployment

      Install Uptycs Protect on MacOS by MDMDeployment This article focuses on the deployment of configuration profiles to install Uptycs Protect using anMDM provider on macOS. Notably, it does not explore the distribution of installation packages.For ...
    • Uptycs Cloud 147 Release Notes

      Disclaimer: This document is for information purposes only. It is subject to change due to ongoing product development by Uptycs. You should not interpret this information as a binding commitment from Uptycs. Without prior written consent from ...