Giter Club home page Giter Club logo

Comments (3)

Jnewbon avatar Jnewbon commented on July 23, 2024

Hi,

I found out that this error is produced when the executables working directory does not contain the card template.

Check the working directory contains the provided template file and is readable by the user running the service

from prometheus-msteams.

mattups avatar mattups commented on July 23, 2024

Circling back on this...
So apparently there is not shell to exec into the container, so I cannot verify that.
I'm also passing now the card template via values file:

customCardTempalate: |
  {{ define "teams.card" }}
  {
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "{{- if eq .Status "resolved" -}}2DC72D
                  {{- else if eq .Status "firing" -}}
                      {{- if eq .CommonLabels.severity "critical" -}}8C1A1A
                      {{- else if eq .CommonLabels.severity "warning" -}}FFA500
                      {{- else -}}808080{{- end -}}
                  {{- else -}}808080{{- end -}}",
    "summary": "{{ .CommonAnnotations.summary }}",
    "title": "Prometheus Alert ({{ .Status }})",
    "sections": [ {{$externalUrl := .ExternalURL}}
    {{- range $index, $alert := .Alerts }}{{- if $index }},{{- end }}
      {
        "activityTitle": "[{{ $alert.Annotations.description }}]({{ $externalUrl }})", 
        "facts": [
          {{- range $key, $value := $alert.Annotations }}
          {
            "name": "{{ reReplaceAll "_" "\\\\_" $key }}",
            "value": "{{ reReplaceAll "_" "\\\\_" $value }}"
          },
          {{- end -}}
          {{$c := counter}}{{ range $key, $value := $alert.Labels }}{{if call $c}},{{ end }}
          {
            "name": "{{ reReplaceAll "_" "\\\\_" $key }}",
            "value": "{{ reReplaceAll "_" "\\\\_" $value }}"
          }
          {{- end }}
        ],
        "markdown": true
      }
      {{- end }}
    ]
  }
  {{ end }}

But the error remains. Am I missing something from the docs maybe?

from prometheus-msteams.

mattups avatar mattups commented on July 23, 2024

Ok it's solved.
In the end the problem was that the charts was deployed via Rancher (not Fleet).
The volume mounts were ok, ConfigMaps as well and so on but in the end it didn't work.

Solved by using Helm CLI and the default installation command.

For context, this was happening with Rancher v2.7.1 as well with v2.7.6

from prometheus-msteams.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.