cancel
Showing results for 
Search instead for 
Did you mean: 
hpstech
Level 13

Web Request Monitor (CURL)

Has anyone been able to use curl in a SAM component monitor successfully?

Any examples or templates? I searched for curl but did not find anything.

I see this post for using PowerShell but this vendor apparently requires curl for their application.

Web Site (PowerShell) monitor template that allows customized healthy status codes

I'm finding a ton of bash scripts to do this but I guess I need hand holding with doing it with SAM.

I suppose a SAM Linux monitor is the way, but just looking for any guidance on this. Do I need to install curl on the MPE?

Thanks

  • Example:

curl -s -o /dev/null -w "%{http_code}" -u aieadmin:attivio -H "Accept:application/json" -H "Content-Type:application/json" -X POST -d "{\"query\": \"table:health_check\"}" http://165.88.124.93:17000/rest/searchApi/search

4 Replies
hpstech
Level 13

Re: Web Request Monitor (CURL)

Any CURL geniuses out there to show me the way?

0 Kudos
silverbacksays
Level 16

Re: Web Request Monitor (CURL)

Hey hpstech

If you're able to use PowerShell to power the query, you can try using Invoke-WebRequest instead. Since you're looking to interrogate a remote system, the method of grabbing the data shouldn't matter, if you're passing a URL to the command.

Give it a try and let us know how you get on!

0 Kudos
hpstech
Level 13

Re: Web Request Monitor (CURL)

Thanks, I did see the PS posts on this too. I'll give it a shot.

0 Kudos
sturdyerde
Level 13

Re: Web Request Monitor (CURL)

silverbacksays  wrote:

Hey hpstech

If you're able to use PowerShell to power the query, you can try using Invoke-WebRequest instead. Since you're looking to interrogate a remote system, the method of grabbing the data shouldn't matter, if you're passing a URL to the command.

Give it a try and let us know how you get on!

Reinforcing what silverbacksays​...says , I'll echo that Invoke-WebRequest will work for anything that curl can do once you provide the right syntax.