TRY NOW
Pro Tips

Lifecycle Reporting

3 min. read
26/08/2022
By Esben Dochy
ProTips 29

Pro Tips with Esben #29

Since Lansweeper Cloud was released in April as part of our 2022 spring release, we’ve been continuously updating it and adding functionality. Today we’re looking at one of the most recent features, Lifecycle data.

For the last year, I’ve been creating software lifecycle reports and publishing them in our blog and report library. These reports are based on products I think are popular and also have a good lifecycle policy available online. The downside of this method is that it relies solely on me choosing what to cover, which obviously won’t be an exact match with your environment.

Lifecycle Data Preview

The lifecycle data preview feature is supposed to fix these shortcomings and cover everything from software to hardware lifecycle information. While in its current preview stage it is still limited to hardware and OS software lifecycle, the goal is to expand this to include as much as we can.

You’re already able to view this data on your Windows, Mac, and Linux assets and network equipment.

lifecycle data preview

Lifecycle Reporting

Currently, only 1 default report is available for lifecycle data which simply shows you all the assets that have some kind of lifecycle data. However, the most obvious use case is to be alerted and know when an end-of-life date is getting close so you can prepare for the migration or upgrade. Unfortunately, these more advanced calculations are still something that has to be created manually for now, and since Lansweeper Cloud uses MongoDB, this isn’t just a copy-paste from an on-premise report.

Creating the report

Update: New Lifecycle Data reports have been added to Lansweeper Cloud, so manual creation of these reports might not be needed anymore.

The easiest way to start is by duplicating the existing default lifecycle report named “Hardware and OS lifecycle information”. You can do this by opening this report and using the duplicate button in the top right-hand corner.

duplicate button lscloud

Next, you will have to add a “Filter” step. Click on the “Check Code” on the new step, and finally, click the “Edit Code” button. This will pop up a warning that you cannot undo this action, but that’s fine.

edit code lscloud report

Now for the part that actually matters, adding the right code. You can copy-paste the following code into your step:

{
  "$or": [
    {
      "$and": [
        {
          "asset.recognitionInfo.osMetadata.endOfSupportDate": {
            "$gte": "$$$(NOW())",
            "$lte": "$$$(dateFN(+90,d))"
          }
        },
        {
          "asset.recognitionInfo.osMetadata.endOfSupportDate": {
            "$exists": true,
            "$nin": [
              "",
              null
            ]
          }
        }
      ]
    },
    {
      "$and": [
        {
          "asset.recognitionInfo.modelMetadata.endOfSupportDate": {
            "$gte": "$$$(NOW())",
            "$lte": "$$$(dateFN(+90,d))"
          }
        },
        {
          "asset.recognitionInfo.modelMetadata.endOfSupportDate": {
            "$exists": true,
            "$nin": [
              "",
              null
            ]
          }
        }
      ]
    },
    {
      "$and": [
        {
          "asset.recognitionInfo.osMetadata.endOfLifeDate": {
            "$gte": "$$$(NOW())",
            "$lte": "$$$(dateFN(+90,d))"
          }
        },
        {
          "asset.recognitionInfo.osMetadata.endOfLifeDate": {
            "$exists": true,
            "$nin": [
              "",
              null
            ]
          }
        }
      ]
    }
  ]
}

As you might guess from looking at the code, you can adjust how far into the future the report looks, by default, this is set to 90 days. But if you want it to only look 14 days ahead or a full year, all you need to do is change the number 90 with the number of days you want it to look ahead.

Creating a Dashboard

Lastly, you can add this report or variations to a dashboard. By using the “Numbers” widget, you can display the total results of a report, so simply add that widget to your dashboard, select the right reports you’ve created and you should get something similar to what I have.

lifecycle lscloud widget

By clicking on a widget, it will bring you to the full report so you can always easily see the full list of assets.

NO CREDIT CARD REQUIRED

Ready to get started?
You’ll be up and running in no time.

Explore all our features, free for 14 days.