Forum Discussion

Kelemvor's avatar
Kelemvor
Icon for Expert rankExpert
12 days ago

Why are websites missing so many features and treated differently than computers?

Every time I try to do something with websites I just get angry.  I can't change settings at the group level like I can with resources.  Can't easily change thresholds or anything.  The Info tab is blank so I can't see any detail about a website.  If I try to use the API, the formatting is all different so I can't get any tree/group information to filter results.  Everything just sucks about how websites are different than resources.  Why is this?

Is there any way to pull a list of all the websites under s certain folder in the tree?  I can't find any way to do that.  I can't even pull a list of all and then filter by a Group field because it only shows the immediate group and nothing about the higher level groups it's in.  I need to check all the sites under a particular top level folder, to make sure the alerting is the same.  There appear to be absolutely no way to do this without manually going to each sites and checking it by hand.

Thanks.

9 Replies

  • Yeah.  I'd have to do a whole bunch of looping to get 3-4 levels of groups instead of just being able to do Fullpath contains Production or something similar.

    • Stuart_Weenig's avatar
      Stuart_Weenig
      Icon for Legend rankLegend

      Totally agree. It needs to be fixed. What I've posted is a workaround.

      • Kelemvor's avatar
        Kelemvor
        Icon for Expert rankExpert

        Do you have a definition of "soon" by chance?  Weeks?  Months?  Next year?  ;)  And do you have any further details on how it will be after the change?  I like have Websites in their own section, but it just seems like they were an afterthought and just kind of got stuck in there halfheartedly and never really got integrated.

        Thanks!

  • This should be getting better soon as websites are slated to be moved to the resources page "soon" and would be treated like any other object there.

    As for getting the list under a group, you just need the group id then make a call to the api to get the list. Use the SDK and lmwrapper for this.

    websites = lm.get_website_list(size=1000, filter="groupId:74").items

    Where 74 is the id of the group in question.

    • Kelemvor's avatar
      Kelemvor
      Icon for Expert rankExpert

      That only works for the immediate group.  I need subgroups included as well.  Since websites don't contain the FullPath field like resources do, I don't think there is any way to do this.

      • Stuart_Weenig's avatar
        Stuart_Weenig
        Icon for Legend rankLegend

        Yeah, you'd just have to loop through all groups:

        website_groups = lm.get_website_group_list(size=1000).items
        for group in website_groups:
            websites = lm.get_website_list(size=1000, filter=f"groupId:{group.id}").items
            print(f"{group.full_path}: {','.join([x.name for x in websites])}")