github.com/gocrane/crane@v0.11.0/examples/tsp-nodes-dsp.yaml (about)

     1  apiVersion: prediction.crane.io/v1alpha1
     2  kind: TimeSeriesPrediction
     3  metadata:
     4    name: tsp-nodes-dsp
     5    namespace: default
     6  spec:
     7    targetRef:
     8      kind: Node
     9      name: 192.168.56.166
    10    predictionWindowSeconds: 3600
    11    predictionMetrics:
    12      - resourceIdentifier: nodes-cpu
    13        type: ExpressionQuery
    14        expressionQuery:
    15          expression: '1-avg(rate(node_cpu_seconds_total{mode="idle"}[1m])) by (instance)'
    16        algorithm:
    17          algorithmType: "dsp"
    18          dsp:
    19            sampleInterval: "60s"
    20            historyLength: "3d"
    21            estimators:
    22              fft:
    23                - marginFraction: "0.2"
    24                  lowAmplitudeThreshold: "1.0"
    25                  highFrequencyThreshold: "0.05"
    26                  minNumOfSpectrumItems: 10
    27                  maxNumOfSpectrumItems: 20
    28      - resourceIdentifier: nodes-mem
    29        type: ExpressionQuery
    30        expressionQuery:
    31          expression: 'sum(node_memory_MemTotal_bytes{} - node_memory_MemAvailable_bytes{}) by (instance)'
    32        algorithm:
    33          algorithmType: "dsp"
    34          dsp:
    35            sampleInterval: "60s"
    36            historyLength: "3d"
    37            estimators:
    38              fft:
    39                - marginFraction: "0.2"
    40                  lowAmplitudeThreshold: "1.0"
    41                  highFrequencyThreshold: "0.05"
    42                  minNumOfSpectrumItems: 10
    43                  maxNumOfSpectrumItems: 20