Retrieve function logs from controller (#207)

Establish a proxy server from the controller to the log database.

Redirect query commands send from client to database then proxy back the db response.

Use parameter binding instead of fmt.Sprintf to prevent SQL injection.
This commit is contained in:
Ta-Ching Chen
2017-05-30 14:19:22 -07:00
committed by Soam Vasani
parent 531f69a037
commit 990d943f21
7 changed files with 158 additions and 103 deletions
+2 -19
View File
@@ -129,30 +129,13 @@ Finally, you're ready to use Fission!
### Enable Persistent Function Logs (Optional)
Fission uses InfluxDB to store logs and fluentd to forward them from
function pods into InfluxDB. To setup both InfluxDB and fluentd:
Edit `fission-logger.yaml` to add a username and password for the
Influxdb deployment. Then:
function pods into InfluxDB.
```
$ kubectl create -f fission-logger.yaml
```
On the client side,
If you're using minikube or a local cluster:
```
$ export FISSION_LOGDB=http://$(minikube ip):31315
```
If you're using GKE or other cloud:
```
$ export FISSION_LOGDB=http://$(kubectl --namespace fission get svc influxdb -o=jsonpath='{..ip}'):8086
```
That's it for setup. You can now use this to view function logs:
That's it for the basic setup. You can now use following command to view function logs:
```
$ fission function logs --name hello