Log Stdout

Receiver no-reply

This service implements a stdout logger. Unless redirected, standard output is inherited from the parent process. In the case of an interactive shell, that is usually the text terminal which initiated the program.

docker pull registry.goingrid.io/services/log-stdout:v0.1.0

Table of contents

Service properties

This service implements the ingrid protocol message. Following properties are being used:

Property Usage
Class -
Operation -
Control -
Data See below

Data

The log stdout service accepts following payload data properties:

Key Multivalue Default Note
severity no info Valid values:
info warn error debug trace Data will be logged always
actor no
message no

Service capabilities

Log message

POST https://rest.app.goingrid.io/log/slap HTTP/1.1
content-type: application/json
Ingrid-Mode: Execution
Authorization: Basic admin nutz

{
    "severity": ["info"],
    "actor" : ["rest"],
    "message": ["This is an example info message"]
}
[[ $req := newRequest ]]
[[ $data := setValue newData "severity" "info" ]]
[[ $data = setValue $data "actor" "log-stdout" ]]
[[ $data = setValue $data "message" "This is an example info message" ]]

[[ $req = setRequestData $req $data ]]

[[ $resMsg := ingridExec "log_slap" $req ]]
log-stdout:
  image: registry.goingrid.io/services/log-stdout:v0.1.0
  deploy:
    restart_policy:
      condition: on-failure
    placement:
      constraints:
        - node.role == manager
  environment:
    NAME: "log-stdout"
    SERVERHOST: "hive"
    SERVERAUTH: "file:///run/secrets/ing-hive-key"
    INPUTCHANNEL: "log_slap"
  depends_on:
    - hive
  secrets:
    - ing-hive-key
  networks:
    - ing-entry
    - ing-middle
apiVersion: apps/v1
kind: Deployment
metadata:
  name: log-stdout
spec:
  selector:
    matchLabels:
      app: log-stdout
  template:
    metadata:
      labels:
        app: log-stdout
    spec:
      containers:
      - name: log-stdout
        env:
        - name: name
          value: log-stdout
        - name: SERVERHOST
          value: ingrid-hive
        - name: LOGLEVEL
          value: info
        - name: LOGFORMAT
          value: text/default
        - name: LOGSENSITIVE
          value: "false"
        - name: INPUTCHANNEL
          value: log_slap
        - name: SERVERAUTH
          valueFrom:
            secretKeyRef:
              key: serverkey
              name: ingrid-serverkey
        image: registry-dev.goingrid.io/services/log-stdout:latest
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 200m
            memory: 32Mi
          requests:
            cpu: 50m
            memory: 16Mi
        volumeMounts:
        - mountPath: /logs
          name: log-stdout
      serviceAccount: ingrid
      serviceAccountName: ingrid
      volumes:
      - name: log-stdout
        persistentVolumeClaim:
          claimName: log-stdout-claim

Service configuration

Parameter Default Description
InputChannel* "log_slap" Channel to be used as input

* inherited from service configuration, mentioned here because it has a different default value

The log stdout service has no additional properties than all properties of the service configuration and the input configuration.