Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
6 months ago

How can I import a bunch of websites?

Hi,

The documentation just says to import a JSON file, but I don't see anything about how to format said JSON file.  Does anyone have any more information on how I can format a file to import a bunch of Internal URLs?

https://www.logicmonitor.com/support/websites-management#h-importing-a-website-check-from-file

https://www.logicmonitor.com/support/services/adding-managing-services/editing-an-existing-service#importing

If anyone from LM sees this, please add an Example file or something to the above pages.  :)

4 Replies

  • [
      {
        "name": "Internal API - Auth Service",
        "type": "http",
        "url": "http://10.0.0.1:8080/health",
        "method": "GET",
        "expectedResponseCode": 200,
        "contentMatch": "OK",
        "timeout": 5000,
        "interval": 60,
        "locations": ["internal"]
      },
      {
        "name": "Internal API - Billing Service",
        "type": "https",
        "url": "https://billing.internal.corp/api/status",
        "method": "GET",
        "expectedResponseCode": 200,
        "contentMatch": "READY",
        "timeout": 7000,
        "interval": 120,
        "locations": ["internal"]
      }
    ]

    This would be the structure 😃

  • Did anyone find the website base json file that can be used to import massive amount urls to monitor?

    The support page for Website monitoring ( https://www.logicmonitor.com/support/websites-management ) doesn't provide the JSON file example and Joe_Williams​  where is the 'export' option in LM \ Websites? 

     

  • Kelemvor - this is easily scripted.  Please DM me a sample spreadsheet (3 lines would do and the data can be fake) and I'll knock something up for you.

  • I agree sample files, like with the netscan csv would be nice.

    You could add an example website into monitoring, and then export it. You would then have a base file for manual importation.

    Personally I would add a sample, and then use the API to duplicate the object adjust what I need then post a new website through automation.