Code Monkey home page Code Monkey logo

Comments (9)

mkuratczyk avatar mkuratczyk commented on July 17, 2024

Hey. It's complaining about file "agent.cert" which quite clearly is not a JSON-formatted Grafana dashboard at all. :) I don't think that file comes from this bosh release.

from prometheus-boshrelease.

poblin-orange avatar poblin-orange commented on July 17, 2024

@mkuratczyk i agree, doesnt seem to be a file of this bosh release :-)
Well i tried to delete it, but it consistently comes back at the same time the grafana poststart runs (see timestemps which confirm).

from prometheus-boshrelease.

frodenas avatar frodenas commented on July 17, 2024

Can you please check your grafana.prometheus.dashboard_files properties? Or the agent.cert file is specified there or there is a glob pattern (introduced at v15.0.0) pointing to a directory that contains that file.

from prometheus-boshrelease.

ArthurHlt avatar ArthurHlt commented on July 17, 2024

@poblin-orange you should set the properties grafana.prometheus.dashboard_files to /var/vcap/jobs/*_dashboards/*.json.
btw @frodenas this can be a default value (or a fixed value) like this you just need to set jobs on the deployment to have dashboard you want, what do you think ?

from prometheus-boshrelease.

poblin-orange avatar poblin-orange commented on July 17, 2024

i think i did user the new location. Heres my snippet grafana instance group

- name: grafana
  instances: 1
  vm_type: small 
  stemcell: trusty
  azs: [z1]
  networks: [{name: tf-net-exchange}]
  persistent_disk_type: small_disk 
  jobs:
  - name: bosh_dashboards
    release: prometheus
  - name: system_dashboards
    release: prometheus
  - name: cloudfoundry_dashboards
    release: prometheus
  - name: mysql_dashboards
    release: prometheus
    
  - name: kubernetes_dashboards
    release: prometheus
  - name: p_rabbitmq_dashboards
    release: prometheus
  - name: p_redis_dashboards
    release: prometheus
  - name: prometheus_dashboards
    release: prometheus
  - name: rabbitmq_dashboards
    release: prometheus
  - name: redis_dashboards
    release: prometheus
  - name: probe_dashboards
    release: prometheus
  - name: shield_dashboards
    release: prometheus
    
  
  - name: grafana
    release: prometheus
    properties:
      grafana:
        server:
          root_url: (( concat "https://elpaaso-prometheus-grafana." secrets.cloudfoundry.ops_domain "/" ))
          domain: ((grab secrets.cloudfoundry.ops_domain ))
        security:
          admin_password: (( grab secrets.grafana.security.admin_password ))
        dashboards:
          json:
            enabled: true
        prometheus:
          dashboard_files:
            - /var/vcap/jobs/bosh_dashboards/*.json
            - /var/vcap/jobs/cloudfoundry_dashboards/*.json
            - /var/vcap/jobs/consul_dashboards/*.json
            - /var/vcap/jobs/haproxy_dashboards/*.json
            - /var/vcap/jobs/kubernetes_dashboards/*.json
            - /var/vcap/jobs/mysql_dashboards/*.json
            - /var/vcap/jobs/p_rabbitmq_dashboards/*.json
            - /var/vcap/jobs/p_redis_dashboards/*.json
            - /var/vcap/jobs/postgres_dashboards/*.json
            - /var/vcap/jobs/probe_dashboards/*.json
            - /var/vcap/jobs/prometheus_dashboards/*.json
            - /var/vcap/jobs/rabbitmq_dashboards/*.json
            - /var/vcap/jobs/redis_dashboards/*.json
            - /var/vcap/jobs/system_dashboards/*.json
            - /var/vcap/jobs/p_rabbitmq_dashboards/*.json
            - /var/vcap/jobs/shield_dashboards/*.json            
          
        users:
          allow_sign_up: false
        auth:
          disable_login_form: false # set to true when oauth login
          ldap:
            enabled: true
            config: (( file "secrets/grafana.auth.ldap.config.toml" )) 

from prometheus-boshrelease.

frodenas avatar frodenas commented on July 17, 2024

@poblin-orange Can you please check the contents of the /var/vcap/jobs/grafana/bin/prometheus-dashboards file inside the grafana vm? You'll see a bunch of for dashboard_file in xxx, do you see there anything strange?

I need to run some tests, but may be what's happening is that there're some dashboard directories that does not exist in the vm, ie. you have specified /var/vcap/jobs/consul_dashboards/*.json and the consul_dashboard job is not specified at the jobs section.

BTW, I'm pretty sure that the agent.cert comes from the /var/vcap/bosh dir, and it's due to an incorrect glob pattern.

from prometheus-boshrelease.

frodenas avatar frodenas commented on July 17, 2024

ok, I ran some tests (ie. adding /var/vcap/jobs/test_dashboards/*.json to the dashboard_files) and got the same error:

Updating dashboard agent.cert at Wed Jun  7 20:43:14 UTC 2017
Validating /var/vcap/store/grafana/dashboards//agent.cert
parse error: Invalid numeric literal at line 1, column 11

So the problem happens when you specify a directory that does not exist. The shopt -s nullglob at the prometheus-dashboards script, when the directory does not exists, returns an empty string, so the ls is performed with an empty string, that in fact, list the contents of the current directory (/var/vcap/bosh), so this is why is listing the agent.cert file.

I'll try to fix this asap.

from prometheus-boshrelease.

poblin-orange avatar poblin-orange commented on July 17, 2024

@frodenas nice. I was getting crazy with this one :-).
Ill fix the missing jobs in my manifest
Thank you

from prometheus-boshrelease.

frodenas avatar frodenas commented on July 17, 2024

@poblin-orange This has been fixed at 6d0b41b. I'll cut a new release pretty soon.

from prometheus-boshrelease.

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.