Joe Tran

  • Content count

  • Joined

  • Last visited

  • Days Won


Community Reputation

14 Good

About Joe Tran

  • Rank
    Community All Star
  1. Most of the Linux environments I work with are RHEL or CentOS and our prompts look like: [username@hostname ~]$ I can't seem to find a prompt pattern that works for both the closing square bracket and the dollar sign when writing a script using the com.santaba.agent.groovyapi.expect.Expect package. No amount of escaping seems to work like '\\]\\$' or ']\\$'. I do need the multi-character prompt because the output I want to parse will include errant $, but not ]$. Multi-character prompts are generally not a problem because I often have to expect a sudo password prompt using a 'username:' pattern and this works without issue. Any ideas on how to tackle this?
  2. view access to website steps

    I've waffled on this feature a bit internally. Being able to see the request payloads would give the viewer access to see privileged credential information potentially.
  3. Honestly, I don't use glob in the Resource searching, but I can confirm it is behaving as @Mosh describes.
  4. parsing response

    CORRECTION to my last post. You'll want to iterate through 'items' list which is in the 'data' JSON-object.
  5. Auto Assign Device group based on IPs

    You could hypothetically use dynamic groups and helluva lot of regex to do that. The system.ips property appears to be one of those array properties, so use the join( ) function to combine them. Then use regular expression equality--- join(system.ips, ",") =~ "192\\.168\\.0\\.[0-2]?[0-9](?:,|$)" This should filter the group's membership to only include devices with IPs from to
  6. parsing response

    A couple things. If you are using the requests Python package, you can use the .json() method from the response class. The .content property will return bytes, and that just makes things more complicated than necessary. Assuming this is v1 REST API (because you are referencing the 'data' key from the response), is your API call hitting the /device/devices/{devId} or is it /device/devices resource path (i.e. are you GET'ing a specific device by id or a list of devices)? A GET for /device/devices should return a <class 'list'> object for the 'data' key or, as @Mike Moniz mentioned, will return 0 to n number of devices. So either iterate through all the devices in 'data' or if you only care about the first device, reference the 0 index of 'data' import requests [...] # use .json() method instead of .content jsonResponse = response.json() # Iterate through all devices in 'data' for device in jsonResponse['data']: deviceID = device['id'] print('ID', str(deviceID)) # Only care about the first device in 'data' deviceID=(jsonResponse['data'][0]['id']) print('ID', str(deviceID))
  7. Collector Services PropertySource

    This will certainly help with ensuring our Collectors are adhering to our internal standards, but it looks like the PropertySource is "undergoing security review".
  8. It looks like if a collector goes down, the internal website check won't trigger the alert for website-overall, if we configure alert trigger to "at All test locations" and have more than one collector assigned to monitor the app. Strangely, I can see in the raw data and graphs that the website-Overall does switch value to 2 (i.e. not OK). We are an AWS shop and deploy collectors in each client's VPC AND from a collector that has routing to the client VPC (e.g. from the client's on-prem network). We were conducting DR testing where the AWS based collector was "killed" along with the rest of the VPC, but we never saw an alert trigger for website-Overall.
  9. PowerShell -- Instance Property Support

    Sorry for being unclear. I was attempting to consume instance level properties in a PowerShell collection script. The PowerShell Collection script tried assigning two ILPs to a variable-- one was a JSON formatted string ( and another was a plain ol' string (auto.logname). Like so: $events = '##AUTO.EVENTS##' $logname = "##AUTO.LOGNAME##" It took a little testing and debugging to figure out that my attempts to iterate through the JSON object were failing because the substitution engine were making these empty strings .
  10. It had been ages since I had to write a datasource in PowerShell so I haven't stayed up-to-date on the latest bells and whistles available. But I was very surprised to see that instance properties are still not supported. With the substitution engine and enhancements made on the Groovy-side, I would have thought this trivial to implement. Is supporting instance properties on the horizon for PowerShell scripting for Datasources?
  11. Windows Basics PropertySource

    Thanks, @Andrey Kitsen!
  12. Windows Basics PropertySource

    Is there a newer version of what @David Bond (LM) posted? The one listed above is "currently undergoing security review".
  13. First, huge--- HUGE--- thank you for publishing the REST API v2. I did notice that some GETs for some resources don't support filter querying--specifically historysdts. We want to filter based off of startEpoch and endEpoch. I would also love to see historysdts officially support for websites and website groups
  14. Additional Checkpoint locations

    @Sarah Terry Fortunately, SF checkpoint is fine for our use cases but we do have to reconsider how our Website checks are configured. For some of our apps we will alert if >= 50% of checkpoints are in error and for our US-based client base, we only use the US-based checkpoints. We will have to revisit checkpoint assignments and alert triggers for our Website checks now. We do have hardware and therefore Collectors across the country. Is it possible to have a mix of the public and internal checkpoints assigned to the same Website check in the future? Obviously, certain features won't be available (i.e. scripted Request and Response), but having that flexibility would be awesome.