Skip to content

Instantly share code, notes, and snippets.

Avatar

Anil Reddy Saripiralla anilsakr

  • Accpre Software Technologies
  • Hyderabad
View GitHub Profile
@anilsakr
anilsakr / import-job.yaml
Created Sep 1, 2020
Kubernetes Setup for Prometheus and Grafana
View import-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: grafana-import-dashboards
namespace: monitoring
labels:
app: grafana
component: import-dashboards
spec:
template:
View nginx.conf
worker_processes 1;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
include /etc/nginx/conf.d/*.conf;
View lua_script.sh
location /sumdemo {
set $diff ''; # we have to predefine the $diff variable here
set_by_lua $sum '
local a = 32
local b = 56
ngx.var.diff = a - b; -- write to $diff directly
return a + b; -- return the $sum value normally
';
You can’t perform that action at this time.