-
Is this possible? If not, why not.I have looked through the Readme and I cannot find the answer to this. If this is possible, please point me to an example. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes you can see the server UI for a webform or rapi/ for more rest style remote trigger |
Beta Was this translation helpful? Give feedback.
-
Here is a more complete example/answer; good question as it should be better documented (PRs welcome): Server (if you need it accessed directly using https see https://github.com/fortio/proxy#fortio-proxy) go install fortio.org/fortio@latest
fortio server & # starts server. can be a Kubernetes pod or docker container or running anywhere
# note in the output:
14:48:31 REST API on /fortio/rest/run, /fortio/rest/status, /fortio/rest/stop Then trigger a grpc run: eg $ curl "http://localhost:8080/fortio/rest/run?url=https://grpc.fortio.org&runner=grpc&t=1s&qps=5" {
"RunType": "GRPC Health",
"Labels": "",
"StartTime": "2022-10-30T14:55:23.403039-07:00",
"RequestedQPS": "5",
"RequestedDuration": "1s",
"ActualQPS": 4.575166482444729,
"ActualDuration": 874285125,
"NumThreads": 2,
"Version": "1.38.2",
"DurationHistogram": {
"Count": 4,
"Min": 0.072520083,
"Max": 0.073105833,
"Sum": 0.29146974999999997,
"Avg": 0.07286743749999999,
"StdDev": 0.00024073337038018418,
"Data": [
{
"Start": 0.072520083,
"End": 0.073105833,
"Percent": 100,
"Count": 4
}
],
"Percentiles": [
{
"Percentile": 50,
"Value": 0.072715333
},
{
"Percentile": 75,
"Value": 0.072910583
},
{
"Percentile": 90,
"Value": 0.073027733
},
{
"Percentile": 99,
"Value": 0.073098023
},
{
"Percentile": 99.9,
"Value": 0.07310505199999999
}
]
},
"ErrorsDurationHistogram": {
"Count": 0,
"Min": 0,
"Max": 0,
"Sum": 0,
"Avg": 0,
"StdDev": 0,
"Data": null
},
"Exactly": 0,
"Jitter": false,
"Uniform": false,
"NoCatchUp": false,
"RunID": 5,
"AccessLoggerInfo": "",
"ID": "2022-10-30-145522_5",
"RetCodes": {
"SERVING": 4
},
"Destination": "https://grpc.fortio.org",
"Streams": 1,
"Ping": false
} in server logs
You can pass the parameters of the url either as query args like above or as a JSON object input (or a combination) You can see all the currently available parameter in the source at https://github.com/fortio/fortio/blob/v1.38.2/rapi/restHandler.go#L207-L305 but they pretty much match the flags shown in |
Beta Was this translation helpful? Give feedback.
Here is a more complete example/answer; good question as it should be better documented (PRs welcome):
Server (if you need it accessed directly using https see https://github.com/fortio/proxy#fortio-proxy)
Then trigger a grpc run: eg
$ curl "http://localhost:8080/fortio/rest/run?url=https://grpc.fortio.org&runner=grpc&t=1s&qps=5"