Coder Social home page Coder Social logo

grafana / jsonnet-libs Goto Github PK

View Code? Open in Web Editor NEW
596.0 134.0 160.0 20.03 MB

Grafana Labs' Jsonnet libraries

License: Other

Makefile 1.71% Jsonnet 97.61% Mustache 0.33% HTML 0.01% Shell 0.27% Nix 0.06% Dockerfile 0.01%
monorepo opensource observability prometheus

jsonnet-libs's Introduction

Grafana Labs' Jsonnet libraries

This repository contains various Jsonnet libraries we use at Grafana Labs:

  • consul-mixin: A set of reuseable and extensible dashboards and alerts for running Hashicorp's Consul.

  • grafana-builder: A library for building Grafana dashboards with jsonnet, following the builder pattern.

  • ksonnet-util: An overlay and set of utilities aiming at making working with Kubernetes easier.

  • memcached-mixin: A set of reuseable and extensible dashboards for Memcached.

  • nodejs-mixin: A set of reusable and extensible dashboards for Node.js.

  • caddy-mixin: A set of reusable and extensible dashboards for Caddy.

  • oauth2-proxy: A jsonnet configuration for deploying bitly's OAuth proxy to Kubernetes.

  • prometheus-ksonnet: A set of extensible configurations for running Prometheus on Kubernetes.

  • jira-mixin: A set of reusable and extensible dashboards and alerts for JIRA.

LICENSE

Apache-2.0

jsonnet-libs's People

Contributors

56quarters avatar algchoo avatar armstrmi avatar beorn7 avatar bergquist avatar bominrahmani avatar caleb-hurshman avatar colega avatar cstyan avatar dasomeone avatar davkal avatar duologic avatar gaantunes avatar gouthamve avatar jdbaldry avatar jeschkies avatar jonathanwamsley avatar jtlisi avatar julienduchesne avatar jvrplmlmn avatar malcolmholmes avatar mplzik avatar mshahzeb avatar pracucci avatar rgeyer avatar schmikei avatar sh0rez avatar stefankurek avatar tomwilkie avatar v-zhuravlev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsonnet-libs's Issues

Update README's to reference tanka

It'd be nice if the various README's referenced and gave instructions for tanka instead of ks (since that's now a dead project, right?).

missing name argument for [cluster]role / [cluster]rolebinding in ksonnet-util

The following constructors are called from ksonnet-util/utils.libsonnet#namespacedRBAC and ksonnet-util/utils.libsonnet#rbac:

  • clusterRole.new()
  • clusterRoleBinding.new()
  • role.new()
  • roleBinding.new()

and they all miss the mandatory name argument leading to the following error:

RUNTIME ERROR: Missing argument: name
        vendor/jsonnet-libs/ksonnet-util/util.libsonnet:88:7-24       object <anonymous>

upstream memcached mixin

What would you think about ustreaming this mixin in the memcached_exporter repository? thanks!

prometheus-ksonnet: dashboards sharing name with folder are hidden in Grafana

A concrete example of this behavior:

mixins.libsonnet in this project includes prometheus-mixin, using a grafanaDashboardFolder of Prometheus (relevant code). prometheus-mixin also includes a dashboard called prometheus.json.

This dashboard doesn't appear in Grafana under the "Prometheus" folder, as I'd expect.

If I tweak slightly by modifying the folder name:

    mixins+:: {
      prometheus+: { grafanaDashboardFolder: 'Prom' },
    },

Now the "Prometheus" dashboard does appear under the "Prom" folder. This happens with other mix-ins as well (eg, an "Etcd" folder with an "etcd.json" dashboard), which is how I originally discovered the issue.

Confusion regarding ksonnet and k8s-alpha

It appears that the new (old?) ksonnet at https://github.com/kube-jsonnet/k is officially deprecated in favor of k8s-alpha.

However, it appears that all *sonnet deployments under the Grafana umbrella are still using the above ksonnet libs.
Also, the k8s-alpha README states that it is still experimental.

I am embarking on beginning to unify and port deployments for a few k8s clusters to a single, unified config management system and I'd really like to use Tanka. I'm still learning jsonnet, so I'm still not completely clear on how to design the repository.

Should I:

  • Still only use kube-jsonnet/k for now?
  • Install both k8s-alpha and kube-jsonnet/k and use the existing grafana, loki, prometheus jsonnet-libs as-is?
  • Port everything to k8s alpha?

Are there experimental */jsonnet-libs branches which use k8s-alpha? What is the intended roadmap for migrating towards it?

Where did promeditor go?

I see that promeditor was removed from this repo. Did the code get moved to a different repo somewhere?

Show all available label keys/values as suggestions

When clicking into instance below it should show all available label keys, not just the ones starting with ins...:

Screenshot

This is a deviation from normal typeahead, but perhaps more useful. Let's gather some feedback if this is desired.

prometheus-ksonnet: `bearer_token_file` configured in kubernetes_sd_configs that don't require authorization

For example in kubernetes-pods. The service account file and Kubernetes server certificate is configured for the scrape config. Presumably this was actually meant for authentication to the Kubernetes API server for service discovery (or it exists as an artifact of copy-paste).

The service discovery still works as we don't specify and API server in the kubernetes_sd_config block and Prometheus automatically loads the certificate and service account token.

https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config

# The API server addresses. If left empty, Prometheus is assumed to run inside
# of the cluster and will discover API servers automatically and use the pod's
# CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.

prometheus.libsonnet statefulset has unresolvable diff

When using the prometheus statefulset, the following ks diff is always present when running ks diff --diff-strategy=subset. This diff still exists after a ks apply.

---                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
- live statefulsets prometheus                                                                                                                                                                                                                                                                                                                                                                                                                                                                
+ config statefulsets prometheus                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
   "apiVersion": "apps/v1beta1",                                                                                                                                                                                                                                                                                                                                                                                                                                                              
   "kind": "StatefulSet",                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
   "metadata": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
     "name": "prometheus"                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
   },                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
   "spec": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
     "replicas": 1,                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
     "serviceName": "prometheus",                                                                                                                                                                                                                                                                                                                                                                                                                                                             
     "template": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
       "metadata": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
         "annotations": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
           "prometheus.io.path": "/prometheus/metrics"                                                                                                                                                                                                                                                                                                                                                                                                                                        
         },                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
         "labels": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
           "name": "prometheus"                                                                                                                                                                                                                                                                                                                                                                                                                                                               
         }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
       },                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
       "spec": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
         "containers": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
           {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
             "args": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
               "--config.file=/etc/prometheus/prometheus.yml",                                                                                                                                                                                                                                                                                                                                                                                                                                
               "--web.listen-address=:80",                                                                                                                                                                                                                                                                                                                                                                                                                                                    
               "--web.external-url=https://uswest-cluster.grapeshot.com/prometheus/",                                                                                                                                                                                                                                                                                                                                                                                                         
               "--web.enable-lifecycle",                                                                                                                                                                                                                                                                                                                                                                                                                                                      
               "--web.route-prefix=/prometheus/"                                                                                                                                                                                                                                                                                                                                                                                                                                              
             ],                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
             "image": "prom/prometheus:v2.2.1",                                                                                                                                                                                                                                                                                                                                                                                                                                               
             "imagePullPolicy": "IfNotPresent",                                                                                                                                                                                                                                                                                                                                                                                                                                               
             "name": "prometheus",                                                                                                                                                                                                                                                                                                                                                                                                                                                            
             "ports": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
               {                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                 "containerPort": 80,                                                                                                                                                                                                                                                                                                                                                                                                                                                         
                 "name": "http-metrics"                                                                                                                                                                                                                                                                                                                                                                                                                                                       
               }                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
             ],                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
             "resources": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
               "limits": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                 "cpu": "1",                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                 "memory": "1Gi"                                                                                                                                                                                                                                                                                                                                                                                                                                                              
               }, 
               "requests": {                                                                                                                                                                                                                                                                                                                                                                                                                                                        [118/2921]
                 "cpu": "1",
                 "memory": "1Gi"
               }
             },
             "volumeMounts": [
               {
                 "mountPath": "/prometheus",
                 "name": "prometheus-data"
               },
               {
                 "mountPath": "/etc/prometheus",
                 "name": "prometheus-config"
               }
             ]
           },
           {
             "args": [
               "-v",
               "-t",
               "-p=/etc/prometheus",
               "curl",
               "-X",
               "POST",
               "--fail",
               "-o",
               "-",
               "-sS",
               "http://localhost:80/prometheus/-/reload"
             ],
             "image": "weaveworks/watch:master-5b2a6e5",
             "imagePullPolicy": "IfNotPresent",
             "name": "watch",
             "resources": {
               "limits": {
                 "cpu": "50m",
                 "memory": "100Mi"
               },
               "requests": {
                 "cpu": "50m",
                 "memory": "100Mi"
               }
             },
             "volumeMounts": [
               {
                 "mountPath": "/etc/prometheus",
                 "name": "prometheus-config"
               }
             ]
           }
         ],
         "securityContext": {
           "runAsUser": 0
         },
         "serviceAccount": "prometheus",
         "volumes": [
           {
             "configMap": {
               "name": "prometheus-config"
             },
             "name": "prometheus-config"
           }
         ]
       }
     },
     "volumeClaimTemplates": [
       {
         "metadata": {
           "name": "prometheus-data"
         },
         "spec": {
           "accessModes": [
             "ReadWriteOnce"
           ],
           "resources": {
             "requests": {
               "storage": "300Gi"
             }
           }
         }
+        "apiVersion": "v1"
+        "kind": "PersistentVolumeClaim"
       }
     ]
   }
 }
---

k.libsonnet using jsonnet-bundler

At the moment, ksonnet-util is using the naked k.libsonnet import Ksonnet used to promote:

local k = import 'k.libsonnet';

This however is not really possible with Tanka anymore, because of two reasons:

  1. Tanka does not do magic, so we do not magically add a library to the import paths
  2. jb does not support installing naked files (it did by accident), so you cannot jb install github.com/ksonnet/ksonnet-lib/ksonnet.beta.3/k.libsonnet

Our best solution yet is to use the actual package of this library, which is ksonnet.beta.3, located at github.com/ksonnet/ksonnet-lib/ksonnet.beta.3.
Doing this would involve adding the package prefix to the above mentioned import. Furthermore, it would be cool to add a jsonnetfile.json (no .lock.json though) to the ksonnet-util folder, so that jb automatically takes care of providing the library when ksonnet-util is installed :D

Opinions?

/cc @tomwilkie @malcolmholmes @rfratto @gouthamve

ksonnet-util refactoring for clarity

Having given some talks recently demonstrating Tanka, at the start, I needed to add: (import 'ksonnet-util/kausal.libsonnet'). This makes no sense - what is "ksonnet" and what is "kausal"? (Other than a cool company that has now merged with Grafana Labs!!).

I suggest we make some adjustments to ksonnet-util to make it cleaner for newcomers. These suggestions currently include:

  • move jaeger.libsonnet somewhere more sensible - it is not relevant where it is #291
  • rename ksonnet-util/kausal.libsonnet to tanka-util/util.libsonnet k8s-mixin/defaults.libsonnet #293
  • make the addition of labels (a) optional (b) configurable
  • make prometheus-ksonnet use the defaulted config value for label name

Linting in grafana/jsonnet-libs is broken

Linting in grafana/jsonnet-libs was broken for a long time due to a bug in evaluating exit codes when doing the lint. TL;DR, make lint fails with a non-zero error code only if the last checked jsonnet file check failed. Similar issue seems to have been already fixed in deployment_tools repo.

Moreover, the linting docker image uses an image from kausal, despite of jsonnet-libs/build/Makefile referring to a grafana-hosted image.

Refactor Prometheus Command Line Flags

Currently it's quite difficult to alter the command line flags of a prometheus container. This could be made much easier if the flags were embedded in an object and passed to the mapToFlags function.

instances variable incorrect Postgres mixin dashboard,

The instances variable in the PosrgreSQL dashboard is I think incorrect.
The current variable is label_values(up{job=~"postgres.*"},instance)
However, this does not match the job names from the agent.
image

I think it should possibly be something like this
label_values(up{job="integrations/postgres_exporter"}, instance)

etcd-operator doesn't create CRD

The resulting manifests from the etcd-operator jsonnet library are missing the definition of EtcdCluster, causing any libraries that depend on them to fail to tk diff or tk apply if the target cluster isn't already configured with that CRD.

Replacing a metric in the autocompletion doesn't quite do the right thing

From @tomwilkie on November 17, 2017 11:3

What I expect:

  • click a metric name in the query editor
  • get a drop down of possible metric names
  • click new metrics, have it replace existing metric

What I get:

  • I like the selecting of metrics with a common prefix based on where I click
  • Replacing should work...

Copied from original issue: kausalco/private#88

Can't apply prometheus-ksonnet/ instructions

I was following the instructions in prometheus-ksonnet/README.md and I encountred with the following issue:

~/tmp/k8s-config 17:04:30
$ tk init
GET https://github.com/ksonnet/ksonnet-lib/archive/0d2f82676817bbf9e4acf6495b2090205f323b9f.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
Directory structure set up! Remember to configure the API endpoint:
`tk env set environments/default --server=https://127.0.0.1:6443`

~/tmp/k8s-config 17:04:50
$ export CONTEXT=$(kubectl config current-context)

~/tmp/k8s-config 17:04:53
$ tk env set environments/default  --server-from-context=$CONTEXT
updated spec.apiServer (`https:// -> `https://kubernetes.docker.internal:6443`)

~/tmp/k8s-config 17:04:58
$ jb install github.com/grafana/jsonnet-libs/prometheus-ksonnet
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/grafana/grafana/archive/21ae4802ceba6a8f1de908fba17d2e3c5a220e42.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/kubernetes-monitoring/kubernetes-mixin/archive/4a8e078147dbca51067521e6ac59c7b54d44d3bd.tar.gz 200
GET https://github.com/prometheus/alertmanager/archive/ce108378d4c8d580804452dcc3a31222067793b2.tar.gz 200
GET https://github.com/prometheus/node_exporter/archive/0ce1f39c64a0a37d5aa81da8006661920b097e82.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/prometheus/prometheus/archive/b82d76faecec0f366df7ca816f5677863e72fc3b.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/grafana/grafonnet-lib/archive/aa3a5412cdecc48f18082e8de7ddd6cc25dab745.tar.gz 200
GET https://github.com/grafana/jsonnet-libs/archive/fd1d2f7e962560e3a20abfed161c70f91c991964.tar.gz 200
GET https://github.com/kubernetes-monitoring/kubernetes-mixin/archive/4a8e078147dbca51067521e6ac59c7b54d44d3bd.tar.gz 200

~/tmp/k8s-config 17:07:32
$ cat <<EOF > environments/default/main.jsonnet
local prometheus = import "prometheus-ksonnet/prometheus-ksonnet.libsonnet";

prometheus {
  _config+:: {
    cluster_name: "cluster1",
    namespace: "default",
  },
}
EOF

~/tmp/k8s-config 17:07:37
$ tk diff environments/default
evaluating jsonnet: RUNTIME ERROR: function expected 0 positional argument(s), but got 1
	/Users/oleg/tmp/k8s-config/vendor/ksonnet-util/kausal.libsonnet:69:18-33	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/alertmanager/alertmanager.libsonnet:92:5-33	object <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/alertmanager/alertmanager.libsonnet:106:7-28	thunk from <object <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/ksonnet-util/kausal.libsonnet:185:47-59	thunk from <function <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:1763:216-228	thunk from <function <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:2139:81-101	thunk from <function <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:2139:72-102	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:1763:152-229	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/ksonnet-util/kausal.libsonnet:185:9-68	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/alertmanager/alertmanager.libsonnet:(99:5)-(107:6)	object <anonymous>
	...

	/Users/oleg/tmp/k8s-config/vendor/ksonnet-util/kausal.libsonnet:249:9-14	thunk from <function <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:9734:130-135
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:9820:51-56	thunk from <function <anonymous>>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:9820:42-57	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k8s.libsonnet:9734:104-136
	/Users/oleg/tmp/k8s-config/vendor/ksonnet-util/kausal.libsonnet:(246:7)-(250:8)	function <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/alertmanager/alertmanager.libsonnet:123:5-53	object <anonymous>
	/Users/oleg/tmp/k8s-config/vendor/prometheus-ksonnet/lib/alertmanager.libsonnet:49:10-15	object <anonymous>
	During manifestation

I'm pasting the full context of the process to have the trace of the versions that tk init and jb install download. Same thing happens with both tk diff and tk apply.

I have Tanka 0.13.0 fresh install on Mac using brew.

I'm not sure if the issue is related to something broken in this repo or to a different dependency, but as the process documented here doesn't work I think it's worth tracking it.

prometheus-ksonnet: default dashboard_config_maps is broken

Specifically, it's setting of zero here. The comment alludes that using zero disables sharding, but this check doesn't seem implemented and instead causes dashboards to not be emitted at all. I think 1 is meant instead? That would make it equivalent with the behavior in dashboard_folders_config_map if the mixin doesn't specify grafanaDashboardShards.

FYI this config field is also set to 8 in dashboards.libsonnet, but that gets overridden (deployment.libsonnet is ordered after dashboards.libsonnet on import).

I'd suggest a reconsideration of the naming of dashboard_config_maps if possible, to better match grafanaDashboardShards in the folders case.

Rename and tweak prometheus-ksonnet

Given ksonnet is deprecated, calling this lib prometheus-ksonnet doesn't make sense. Therefore, I propose we rename it prometheus-mixin. We can leave behind a prometheus-ksonnet that will allow for previous installations to still work.

I also propose:

  • Move the Grafana related code into a separate grafana-mixin, and have prometheus-mixin import it via jb.
  • Switch Grafana to a statefulset and give it a small PVC for its sqlite db. This will preserve alert IDs, and also preserve dashboards that users create manually, before they learn the wonders of dashboards as code.
  • Update Grafana to the latest version
  • Reduce the size of the Prometheus PVC. 300Gb is pretty big for an initial install. We should optimise for new user experience. Experienced users can adjust the PVC size to suit.
  • Explore making $.grafana_add_datasource... less Prometheus focused. Allow it to be used for non Prometheus datasources, without making prometheus related code more verbose.

[discussion] tab/enter for autocomplete

From @tomwilkie on August 25, 2017 8:3

We used to allow enter to select an autocompletion, but this meant clicking into the middle of a metric and pressing enter would replace the metric and not submit the query.

Now, we use tab to select an autocompletion, but this means using the arrow keys to select an autocompletion requires you to also use a tab to 'submit' the autocompletion, which seems counter intuitive.

Proposal (for discussion): consider "keyboard focus" - when the focus is in the query box, tab is required to select autocompletion. When you use the arrow keys, the focus moves to the autocompletion dropdown, and enter is allow to select an autocompletion. WDYT?

Copied from original issue: kausalco/private#27

serviceFor() port naming breaks Istio enabled services

Description

For Istio to work, port name in Services need to be formed with <protocol>[-<suffix>]
https://istio.io/docs/ops/configuration/traffic-management/protocol-selection/

When using util.serviceFor(), the ports are named with the container name first :

servicePort.newNamed(c.name + '-' + port.name, port.containerPort, port.containerPort) +

Solution

I propose to change the naming to the other way around:

servicePort.newNamed(port.name + '-' + c.name, port.containerPort, port.containerPort) +

As far as I know, nothing else is dependent on this naming beside Istio...

Change Grafana link to land on search page.

Currently the link to Grafana lands on the home page for Grafana:

url: 'http://grafana.%(namespace)s.svc.%(cluster_dns_suffix)s/' % $._config,

99% of the time I will have to click on the dashboards dropdown or the search magnifier to get to the list of dashboards/folders to navigate to the dashboard I want.

I'm suggesting we add ?search=open to the Grafana URL to automatically bring up the list of dashboards.

My only concern here is people outside of Grafana with different workflows being handed this change and breaking their workflow.

One alternative to this would be a variable you could set in the config to append this query parameter which is not set by default.

Thoughts/opinions anyone?

prometheus-ksonnet fails if no dashboards in root folder

As is shown here:

t=2020-07-31T12:10:18+0000 lvl=eror msg="Cannot read directory" logger=provisioning.dashboard type=file name=dashboards error="stat /grafana/dashboards: no such file or directory"
t=2020-07-31T12:10:18+0000 lvl=eror msg="Failed to read content of symlinked path" logger=provisioning.dashboard type=file name=dashboards path=/grafana/dashboards 

This was generated from a default run of the TNS demo.

Unable to use memcached-mixin dashboard

I want to use memcached-mixin to generate a dashboard. The dashboard generated successfully, but when I import it to Grafana, I cannot see anything.

jb version

โžœ  memcached-mixin jb --version
v0.3.1

grafana version

grafana/grafana:6.6.2

main.jsonnet

local memcached_mixin = (import "memcached-mixin/mixin.libsonnet");

memcached_mixin {}

After importing the dashboard, I cannot see anything in my grafana
image

Steps:

# install mixin
jb install github.com/grafana/jsonnet-libs/memcached-mixin

# generate dashboard
jsonnet -J vendor -m . environments/memcached-mixin/main.jsonnet 

Generated dashboard

          "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "percentunit",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Hits",
            "titleSize": "h6"
         },
         {
            "collapse": false,
            "height": "250px",
            "panels": [
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 2,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job, instance) (rate(memcached_commands_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{command}} {{status}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Commands",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               },
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 3,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (rate(memcached_items_evicted_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Evictions",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               },
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 4,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (rate(memcached_items_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Stored",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Ops",
            "titleSize": "h6"
         },
         {
            "collapse": false,
            "height": "250px",
            "panels": [
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 10,
                  "id": 5,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 0,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 6,
                  "stack": true,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (memcached_current_bytes{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Memory",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "bytes",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               },
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 10,
                  "id": 6,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 0,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 6,
                  "stack": true,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (memcached_current_items{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Items",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Memory",
            "titleSize": "h6"
         },
         {
            "collapse": false,
            "height": "250px",
            "panels": [
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 7,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (rate(memcached_connections_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}} - Connection Rate",
                        "legendLink": null,
                        "step": 10
                     },
                     {
                        "expr": "sum without (job) (memcached_current_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}} - Current Connrections",
                        "legendLink": null,
                        "step": 10
                     },
                     {
                        "expr": "sum without (job) (memcached_max_connections{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}} - Max Connections",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Connections",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               },
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 8,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (rate(memcached_read_bytes_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Reads",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "bps",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               },
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 9,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 4,
                  "stack": false,
                  "steppedLine": false,
                  "targets": [
                     {
                        "expr": "sum without (job) (rate(memcached_written_bytes_total{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"}[1m]))",
                        "format": "time_series",
                        "intervalFactor": 2,
                        "legendFormat": "{{instance}}",
                        "legendLink": null,
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Writes",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "type": "graph",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "bps",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Network",
            "titleSize": "h6"
         },
         {
            "collapse": false,
            "height": "250px",
            "panels": [
               {
                  "aliasColors": { },
                  "bars": false,
                  "dashLength": 10,
                  "dashes": false,
                  "datasource": "$datasource",
                  "fill": 1,
                  "id": 10,
                  "legend": {
                     "avg": false,
                     "current": false,
                     "max": false,
                     "min": false,
                     "show": true,
                     "total": false,
                     "values": false
                  },
                  "lines": true,
                  "linewidth": 1,
                  "links": [ ],
                  "nullPointMode": "null as zero",
                  "percentage": false,
                  "pointradius": 5,
                  "points": false,
                  "renderer": "flot",
                  "seriesOverrides": [ ],
                  "spaceLength": 10,
                  "span": 12,
                  "stack": false,
                  "steppedLine": false,
                  "styles": [
                     {
                        "alias": "Time",
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "pattern": "Time",
                        "type": "hidden"
                     },
                     {
                        "alias": "Count",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "link": false,
                        "linkTooltip": "Drill down",
                        "linkUrl": "",
                        "pattern": "Value #A",
                        "thresholds": [ ],
                        "type": "hidden",
                        "unit": "short"
                     },
                     {
                        "alias": "Uptime",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "link": false,
                        "linkTooltip": "Drill down",
                        "linkUrl": "",
                        "pattern": "Value #B",
                        "thresholds": [ ],
                        "type": "number",
                        "unit": "dtdurations"
                     },
                     {
                        "alias": "Instance",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "link": false,
                        "linkTooltip": "Drill down",
                        "linkUrl": "",
                        "pattern": "instance",
                        "thresholds": [ ],
                        "type": "number",
                        "unit": "short"
                     },
                     {
                        "alias": "Job",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "link": false,
                        "linkTooltip": "Drill down",
                        "linkUrl": "",
                        "pattern": "job",
                        "thresholds": [ ],
                        "type": "number",
                        "unit": "short"
                     },
                     {
                        "alias": "Version",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "link": false,
                        "linkTooltip": "Drill down",
                        "linkUrl": "",
                        "pattern": "version",
                        "thresholds": [ ],
                        "type": "number",
                        "unit": "short"
                     },
                     {
                        "alias": "",
                        "colorMode": null,
                        "colors": [ ],
                        "dateFormat": "YYYY-MM-DD HH:mm:ss",
                        "decimals": 2,
                        "pattern": "/.*/",
                        "thresholds": [ ],
                        "type": "string",
                        "unit": "short"
                     }
                  ],
                  "targets": [
                     {
                        "expr": "count by (job, instance, version) (memcached_version{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "table",
                        "instant": true,
                        "intervalFactor": 2,
                        "legendFormat": "",
                        "refId": "A",
                        "step": 10
                     },
                     {
                        "expr": "max by (job, instance) (memcached_uptime_seconds{cluster=~\"$cluster\", job=~\"$job\", instance=~\"$instance\"})",
                        "format": "table",
                        "instant": true,
                        "intervalFactor": 2,
                        "legendFormat": "",
                        "refId": "B",
                        "step": 10
                     }
                  ],
                  "thresholds": [ ],
                  "timeFrom": null,
                  "timeShift": null,
                  "title": "Memcached Info",
                  "tooltip": {
                     "shared": true,
                     "sort": 0,
                     "value_type": "individual"
                  },
                  "transform": "table",
                  "type": "table",
                  "xaxis": {
                     "buckets": null,
                     "mode": "time",
                     "name": null,
                     "show": true,
                     "values": [ ]
                  },
                  "yaxes": [
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": 0,
                        "show": true
                     },
                     {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": false
                     }
                  ]
               }
            ],
            "repeat": null,
            "repeatIteration": null,
            "repeatRowId": null,
            "showTitle": true,
            "title": "Memcached Info",
            "titleSize": "h6"
         }
      ],
      "schemaVersion": 14,
      "style": "dark",
      "tags": [ ],
      "templating": {
         "list": [
            {
               "current": {
                  "text": "default",
                  "value": "default"
               },
               "hide": 0,
               "label": null,
               "name": "datasource",
               "options": [ ],
               "query": "prometheus",
               "refresh": 1,
               "regex": "",
               "type": "datasource"
            },
            {
               "allValue": null,
               "current": {
                  "selected": true,
                  "text": "All",
                  "value": "$__all"
               },
               "datasource": "$datasource",
               "hide": 0,
               "includeAll": true,
               "label": "cluster",
               "multi": true,
               "name": "cluster",
               "options": [ ],
               "query": "label_values(memcached_commands_total, cluster)",
               "refresh": 1,
               "regex": "",
               "sort": 2,
               "tagValuesQuery": "",
               "tags": [ ],
               "tagsQuery": "",
               "type": "query",
               "useTags": false
            },
            {
               "allValue": null,
               "current": {
                  "selected": true,
                  "text": "All",
                  "value": "$__all"
               },
               "datasource": "$datasource",
               "hide": 0,
               "includeAll": true,
               "label": "job",
               "multi": true,
               "name": "job",
               "options": [ ],
               "query": "label_values(memcached_commands_total{cluster=~\"$cluster\"}, job)",
               "refresh": 1,
               "regex": "",
               "sort": 2,
               "tagValuesQuery": "",
               "tags": [ ],
               "tagsQuery": "",
               "type": "query",
               "useTags": false
            },
            {
               "allValue": null,
               "current": {
                  "selected": true,
                  "text": "All",
                  "value": "$__all"
               },
               "datasource": "$datasource",
               "hide": 0,
               "includeAll": true,
               "label": "instance",
               "multi": true,
               "name": "instance",
               "options": [ ],
               "query": "label_values(memcached_commands_total{cluster=~\"$cluster\",job=~\"$job\"}, instance)",
               "refresh": 1,
               "regex": "",
               "sort": 2,
               "tagValuesQuery": "",
               "tags": [ ],
               "tagsQuery": "",
               "type": "query",
               "useTags": false
            }
         ]
      },
      "time": {
         "from": "now-1h",
         "to": "now"
      },
      "timepicker": {
         "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
         ],
         "time_options": [
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
         ]
      },
      "timezone": "utc",
      "title": "Memcached",
      "uid": "",
      "version": 0
   }
}

Tidy up Prometheus config

  • remove option to run as a deployment. (#156)
  • remove old non-sharded dashboard config map.
  • remove support for old mixin field names (grafana_dashboards vs grafanaDashboards) #234
  • scrape grafana metrics (#239)
  • stop running grafana as root (#240)
  • stop running prometheus, alertmanager etc as root (but keep them serving on port 80 if possible) (#244)
  • get rid of the lib folder, put them all in the base folder like the rest of our modules.
  • move HA pair handling here.
  • move the config fields into their respective files, and remove unused ones.
  • audit and update node-exporter flags (we have ones left over from 0.16)
  • add silence link to alert template
  • make a file per-mixins' alerts, not one big file - makes diffing easier when order changes.

Bracket completion put closing bracket in wrong place for rate(...) / rate(...)

From @tomwilkie on August 31, 2017 10:30

If I have:

rate(request_duration_seconds_sum[5m]) / rate(request_duration_seconds_count[5m])

And I put a sum( at the beginning, I get:

sum(rate(request_duration_seconds_sum[5m]) / rate(request_duration_seconds_count[5m]))

Whereas what I wanted was:

sum(rate(request_duration_seconds_sum[5m])) / rate(request_duration_seconds_count[5m])

Copied from original issue: kausalco/private#35

prometheus-ksonnet/alertmanager needs a headless service if replicas > 1

Alertmanager configures its peer addresses when the replica count is > 1. It follows the pod discovery convention used by Statefulsets. The processes themselves use this convention to gossip to their peers.

However, without a Headless Service named alertmanager, they can't reach one another.

By default, the existing service is already named alertmanager. It also exposes ports 9094 and 9093, which it probably doesn't need to. It should probably only expose 80.

Maybe we could name the new service alertmanager-gossip which has ClusterIp set to None, and only expose 9094 and 9093 on it, when replicas is > 1.

enterprise-metrics: `$._config.commonArgs` confusing configuration

All module arguments inherit and override $._config.commonArgs. In order to benefit from the cortex-jsonnet best practices, Cortex modules (modules that aren't specific to GEM) inherit their arguments from the vendored library. Since the inheritance is $._config.commonArgs + cortex.<module>_args, configuration made in $_config.commonArgs may not appear in the manifestation of Cortex modules.

As a user I would expect the inheritance to behave more like:
cortex.module_args + $._config.commonArgs + $.<module>.args

prometheus-ksonnet: Create Separate ConfigMaps for Configuration and Rules

We're currently putting alerts.rules, prometheus.yml, and recording.rules into a single ConfigMap. We've gotten to the point where the combined size of those files have become too long. We're getting the error:

Name: "prometheus-...-config", Namespace: "default"
for: "STDIN": ConfigMap "prometheus-...-config" is invalid: metadata.annotations: Too long: must have at most 262144 characters

I understand this is due to exceeding the max annotation size while attempting to set the kubectl.kubernetes.io/last-applied-configuration annotation. Violating the annotation size constraint makes the apply fail.

As a solution, I'd like to propose we break up this single ConfigMap into three, one for each file.

Selectors missing for v1 API's

In #201 we switched from v1beta1 to v1, but missed that we need explicit selectors for that version.

Those need to be added ASAP, the some libs are totally unusable without.

Support dashboards auto gen in CI

There are many dashboards mixins in this repo. However, it just provides a dashboards.jsonnet file, but not everyone has jsonnet experience. Maybe it is better to add a dashboards auto gen in circle CI so that users can use the dashboard file directly.

Editor suggestions do not disappear when clicking outside

Here is the JS error that accompanies this:

Uncaught TypeError: Cannot read property 'contains' of null at Portal.handleOutsideMouseClick .

This used to work until React changed some unstable behaviour that react-portal relied on (unstable_renderSubtreeIntoContainer()).
It's a bit of dead end. The way forward should be

  • upgrade slatejs (it was split into several packages) to last version supporting the current react v15
  • upgrade react from v15 to v16 and with it upgrade react-portal, and hopefully minimally slatejs

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.