Forum Discussion

Naveenkumar's avatar
Naveenkumar
Icon for Neophyte rankNeophyte
11 months ago

Any way to pull available upgrade collector version via API,SDK or any other means.

Hi,

Any way to pull available upgrade collector version via API,SDK or any other means.

  • Hello @Naveenkumar 

    This is definitely something that is available via the API.  From our swagger documentation here, we have the endpoint:

    https://www.logicmonitor.com/swagger-ui-master/api-v3/dist/#/CollectorVersions/getCollectorVersionList 

    /setting/collector/collectors/versions

    However, this endpoint returns the full list of collectors all the way back to 2017 which is not super useful.  What we can do is use the parameter of topVersions=true giving us a full endpoint of:

    /setting/collector/collectors/versions?topVersions=true

    Which when I just tested returned us the value that are currently available for download in the portal:

    {
    "total": 3,
    "items": [
    {
    "majorVersion": 35,
    "minorVersion": 100,
    "mandatory": false,
    "stable": false,
    "releaseEpoch": 0,
    "has32bitWindows": false,
    "has32bitLinux": false
    },
    {
    "majorVersion": 35,
    "minorVersion": 0,
    "mandatory": false,
    "stable": true,
    "releaseEpoch": 1702538848,
    "has32bitWindows": false,
    "has32bitLinux": false
    },
    {
    "majorVersion": 33,
    "minorVersion": 7,
    "mandatory": true,
    "stable": true,
    "releaseEpoch": 1693212733,
    "has32bitWindows": false,
    "has32bitLinux": false
    }
    ],
    "searchId": null,
    "isMin": false
    }

    Let me know if you have any questions!

  • Anonymous's avatar
    Anonymous

    @Stuart Weenig I believe mandatory doesn’t mean supported, instead I believe it refers to the policy where an update will eventually be forced by the platform. If a “mandatory” version exists and the collector is running an older version, it will eventually self-schedule an update. The mandatory updates run a month after the release, which is probably a reason the releaseepoch is there. Looking at the data, I think @Naveenkumar is correct about the labels (but I might not build any application logic on it, without confirming)

    I think we’re intending to say the same thing.

  • @Stuart Weenig I believe mandatory doesn’t mean supported, instead I believe it refers to the policy where an update will eventually be forced by the platform. If a “mandatory” version exists and the collector is running an older version, it will eventually self-schedule an update. The mandatory updates run a month after the release, which is probably a reason the releaseepoch is there. Looking at the data, I think @Naveenkumar is correct about the labels (but I might not build any application logic on it, without confirming)

  • Anonymous's avatar
    Anonymous

    Hi @LMjosephBrett 

    Thanks for your info.

    Also, I’m assuming.
    stable: false & mandatory: false refers Early Release
    stable: true & mandatory: false refers General Release
    stable: true & mandatory: true refers Mandatory General Release


    Is this true by any chance?

    This has been my experience. Stable refers to whether it’s an early access version of the collector. And mandatory refers to whether the version is allowed to talk to the LM platform (as in, whether it’s supported or not).

  • Hi @LMjosephBrett 

    Thanks for your info.

    Also, I’m assuming.
    stable: false & mandatory: false refers Early Release
    stable: true & mandatory: false refers General Release
    stable: true & mandatory: true refers Mandatory General Release


    Is this true by any chance?

  • Hello @Naveenkumar 

    This is definitely something that is available via the API.  From our swagger documentation here, we have the endpoint:

    https://www.logicmonitor.com/swagger-ui-master/api-v3/dist/#/CollectorVersions/getCollectorVersionList 

    /setting/collector/collectors/versions

    However, this endpoint returns the full list of collectors all the way back to 2017 which is not super useful.  What we can do is use the parameter of topVersions=true giving us a full endpoint of:

    /setting/collector/collectors/versions?topVersions=true

    Which when I just tested returned us the value that are currently available for download in the portal:

    {
    "total": 3,
    "items": [
    {
    "majorVersion": 35,
    "minorVersion": 100,
    "mandatory": false,
    "stable": false,
    "releaseEpoch": 0,
    "has32bitWindows": false,
    "has32bitLinux": false
    },
    {
    "majorVersion": 35,
    "minorVersion": 0,
    "mandatory": false,
    "stable": true,
    "releaseEpoch": 1702538848,
    "has32bitWindows": false,
    "has32bitLinux": false
    },
    {
    "majorVersion": 33,
    "minorVersion": 7,
    "mandatory": true,
    "stable": true,
    "releaseEpoch": 1693212733,
    "has32bitWindows": false,
    "has32bitLinux": false
    }
    ],
    "searchId": null,
    "isMin": false
    }

    Let me know if you have any questions!