From f227d2f1a9d7349009138a9c7707b88e852db6b3 Mon Sep 17 00:00:00 2001 From: anuudb Date: Tue, 25 Jun 2019 14:54:18 +0530 Subject: [PATCH 1/6] Logstash filtering --- copper-hub/ELK-hub/logstash-deployment.yaml | 9 + copper-server/kubernetes/deployment/ldap.ldif | 28 +-- .../kubernetes/deployment/secret.yaml | 16 +- .../kubernetes/deployment/tls/ca.crt | 1 - .../kubernetes/deployment/tls/cert.crt | 18 -- .../kubernetes/deployment/tls/cert.key | 6 - .../kubernetes/deployment/tls/cert.pem | 18 -- .../deployment/tls/copper.opensource.lk.crt | 42 ++--- .../deployment/tls/copper.opensource.lk.csr | 28 +-- .../deployment/tls/copper.opensource.lk.key | 50 ++--- .../kubernetes/deployment/tls/dhparam.pem | 12 +- .../kubernetes/deployment/tls/fullchain.pem | 1 - .../kubernetes/deployment/tls/privkey.pem | 6 - .../kubernetes/deployment/tls/rootCA.crt | 52 ++--- .../kubernetes/deployment/tls/rootCA.key | 98 +++++----- .../kubernetes/deployment/tls/rootCA.srl | 2 +- .../AlertManagerConfigmap.yaml | 38 ---- .../AlertTemplateConfigMap.yaml | 178 ------------------ .../prometheus-alert/Deployment.yaml | 41 ---- .../kubernetes/prometheus-alert/README.md | 51 ----- .../kubernetes/prometheus-alert/Service.yaml | 17 -- .../prometheus-alert/clusterRole.yaml | 33 ---- .../prometheus-alert/config-map.yaml | 148 --------------- .../prometheus-deployment.yaml | 33 ---- .../prometheus-alert/prometheus-service.yaml | 18 -- .../live/mail.copper.mail.lk/.fullchain.pem | 54 +++--- .../live/mail.copper.mail.lk/.privkey.pem | 100 +++++----- 27 files changed, 250 insertions(+), 848 deletions(-) delete mode 120000 copper-server/kubernetes/deployment/tls/ca.crt delete mode 100644 copper-server/kubernetes/deployment/tls/cert.crt delete mode 100644 copper-server/kubernetes/deployment/tls/cert.key delete mode 100644 copper-server/kubernetes/deployment/tls/cert.pem delete mode 120000 copper-server/kubernetes/deployment/tls/fullchain.pem delete mode 100644 copper-server/kubernetes/deployment/tls/privkey.pem delete mode 100755 copper-server/kubernetes/prometheus-alert/AlertManagerConfigmap.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/AlertTemplateConfigMap.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/Deployment.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/README.md delete mode 100755 copper-server/kubernetes/prometheus-alert/Service.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/clusterRole.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/config-map.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/prometheus-deployment.yaml delete mode 100755 copper-server/kubernetes/prometheus-alert/prometheus-service.yaml diff --git a/copper-hub/ELK-hub/logstash-deployment.yaml b/copper-hub/ELK-hub/logstash-deployment.yaml index cb317ac8..a932656e 100644 --- a/copper-hub/ELK-hub/logstash-deployment.yaml +++ b/copper-hub/ELK-hub/logstash-deployment.yaml @@ -41,6 +41,15 @@ data: # } # } #} + + filter { + # if "Host not found" not in [message]{ + # drop{ } + # } + if ([message] !~ "Host not found") { + drop { } + } + } #filter { # if [type] == "log" { diff --git a/copper-server/kubernetes/deployment/ldap.ldif b/copper-server/kubernetes/deployment/ldap.ldif index 4be35b74..3585bb0e 100755 --- a/copper-server/kubernetes/deployment/ldap.ldif +++ b/copper-server/kubernetes/deployment/ldap.ldif @@ -1,46 +1,46 @@ version: 1 -dn: ou=domains,dc=copper,dc=mail,dc=lk +dn: ou=domains,dc=copper,dc=opensource,dc=lk objectclass: organizationalUnit objectclass: top ou: domains -dn: dc=copper.mail.lk,ou=domains,dc=copper,dc=mail,dc=lk -associateddomain: copper.mail.lk -dc: copper.mail.lk +dn: dc=copper.opensource.lk,ou=domains,dc=copper,dc=opensource,dc=lk +associateddomain: copper.opensource.lk +dc: copper.opensource.lk objectclass: dNSDomain objectclass: domainRelatedObject objectclass: top -dn: ou=groups,dc=copper,dc=mail,dc=lk +dn: ou=groups,dc=copper,dc=opensource,dc=lk objectclass: organizationalUnit objectclass: top ou: groups -dn: cn=admins,ou=groups,dc=copper,dc=mail,dc=lk +dn: cn=admins,ou=groups,dc=copper,dc=opensource,dc=lk cn: admins gidnumber: 500 objectclass: posixGroup objectclass: top -dn: cn=users,ou=groups,dc=copper,dc=mail,dc=lk +dn: cn=users,ou=groups,dc=copper,dc=opensource,dc=lk cn: users gidnumber: 501 objectclass: posixGroup objectclass: top -dn: ou=Users,dc=copper,dc=mail,dc=lk +dn: ou=Users,dc=copper,dc=opensource,dc=lk objectclass: organizationalUnit objectclass: top ou: Users -dn: uid=system,ou=Users,dc=copper,dc=mail,dc=lk +dn: uid=system,ou=Users,dc=copper,dc=opensource,dc=lk cn: system gidnumber: 501 givenname: system homedirectory: /home/Users/system loginshell: /bin/sh -mail: system@copper.mail.lk +mail: system@copper.opensource.lk objectclass: inetOrgPerson objectclass: posixAccount objectclass: top @@ -50,13 +50,13 @@ uidnumber: 1000 userpassword: {SSHA}79+ggcj1RrXEitcvjVBDgqF6NdJf09Y3 #userpassword in plain: system -dn: uid=copper,ou=Users,dc=copper,dc=mail,dc=lk +dn: uid=copper,ou=Users,dc=copper,dc=opensource,dc=lk cn: copper gidnumber: 501 givenname: copper homedirectory: /home/Users/copper loginshell: /bin/sh -mail: copper@copper.mail.lk +mail: copper@copper.opensource.lk objectclass: inetOrgPerson objectclass: posixAccount objectclass: top @@ -66,13 +66,13 @@ uidnumber: 1001 userpassword: {SSHA}79+ggcj1RrXEitcvjVBDgqF6NdJf09Y3 #userpassword in plain: copper -dn: uid=test,ou=Users,dc=copper,dc=mail,dc=lk +dn: uid=test,ou=Users,dc=copper,dc=opensource,dc=lk cn: test gidnumber: 501 givenname: test homedirectory: /home/Users/test loginshell: /bin/sh -mail: test@copper.mail.lk +mail: test@copper.opensource.lk objectclass: inetOrgPerson objectclass: posixAccount objectclass: top diff --git a/copper-server/kubernetes/deployment/secret.yaml b/copper-server/kubernetes/deployment/secret.yaml index a416017c..2b664024 100755 --- a/copper-server/kubernetes/deployment/secret.yaml +++ b/copper-server/kubernetes/deployment/secret.yaml @@ -12,13 +12,13 @@ stringData: MYSQL_PASSWORD: admin CN: admin DC1: copper - DC2: mail + DC2: opensource DC3: lk DNPASS: admin RO: ro ROPASS: road PHPLDAPADMIN_LDAP_HOSTS: ldap - PHPLDAPADMIN_SERVER_ADMIN: admin@copper.mail.lk + PHPLDAPADMIN_SERVER_ADMIN: admin@copper.opensource.lk PHPLDAPADMIN_SERVER_PATH: /phpldapadmin PHPLDAPADMIN_HTTPS: "false" PHPLDAPADMIN_HTTPS_CRT_FILENAME: cert.crt @@ -31,7 +31,7 @@ stringData: PHPLDAPADMIN_LDAP_CLIENT_TLS_CA_CRT_FILENAME: ca.crt LDAP_ORGANISATION: lsf ORGNIZATION: lsf - LDAP_DOMAIN: copper.mail.lk + LDAP_DOMAIN: copper.opensource.lk LDAP_ADMIN_PASSWORD: admin LDAP_LOG_LEVEL: "-1" LDAP_CONFIG_PASSWORD: admin @@ -54,11 +54,11 @@ stringData: OU : Users LDAP_HOST_IP : ldap KEY_PATH : KEYPATH - EMAIL : admin@copper.mail.lk - HOSTNAME : mail.copper.mail.lk - FQDN : mail.copper.mail.lk - DOMAIN : copper.mail.lk + EMAIL : admin@copper.opensource.lk + HOSTNAME : mail.copper.opensource.lk + FQDN : mail.copper.opensource.lk + DOMAIN : copper.opensource.lk REDIS_HOST : REDIS_HOST REDIS_PORT : REDIS_PORT DEBUG : "true" - RSPAMD_PASSWORD : spamd + RSPAMD_PASSWORD : admin diff --git a/copper-server/kubernetes/deployment/tls/ca.crt b/copper-server/kubernetes/deployment/tls/ca.crt deleted file mode 120000 index cf7a60f4..00000000 --- a/copper-server/kubernetes/deployment/tls/ca.crt +++ /dev/null @@ -1 +0,0 @@ -/container/service/:ssl-tools/assets/default-ca/default-ca.pem \ No newline at end of file diff --git a/copper-server/kubernetes/deployment/tls/cert.crt b/copper-server/kubernetes/deployment/tls/cert.crt deleted file mode 100644 index 9b831887..00000000 --- a/copper-server/kubern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uVX6QGepO+eAoTETHn+L9DDpSTWLc0b2jRO/uQ4fb3wf+i5q56dE0DyvJ ------END CERTIFICATE----- diff --git a/copper-server/kubernetes/deployment/tls/cert.key b/copper-server/kubernetes/deployment/tls/cert.key deleted file mode 100644 index e8936a8c..00000000 --- a/copper-server/kubernetes/deployment/tls/cert.key +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIGkAgEBBDA56G5Cz3HzkhF1ohlJVpp+7uyu3B96rMCgTHqSScFYXpXkY5LvlpAV -owxc+km1PIagBwYFK4EEACKhZANiAARD1g/1Hf1AXLsUozlxMWbGM/QvgoPRCzvY -vi5DJ95mB31UvY6+XehiFOTG9vBE00YxPd1be/i4N32asVTg1LTy9Mm5QYI09XYF -gxurX7+6D4PLblzYvWsE2+6HWO55fgk= ------END EC PRIVATE KEY----- diff --git a/copper-server/kubernetes/deployment/tls/cert.pem b/copper-server/kubernetes/deployment/tls/cert.pem deleted file mode 100644 index 11948ab8..00000000 --- a/copper-server/kubernetes/deployment/tls/cert.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC7TCCAnOgAwIBAgIUHpq0y7OeQxa5MN1ORq/eHbgm0IUwCgYIKoZIzj0EAwMw -gZYxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxBMUEgQ2FyIFdhc2gxJDAiBgNVBAsT -G0luZm9ybWF0aW9uIFRlY2hub2xvZ3kgRGVwLjEUMBIGA1UEBxMLQWxidXF1ZXJx -dWUxEzARBgNVBAgTCk5ldyBNZXhpY28xHzAdBgNVBAMTFmRvY2tlci1saWdodC1i -YXNlaW1hZ2UwHhcNMTkwNjE3MDQ1NTAwWhcNMjAwNjE2MDQ1NTAwWjCBhDELMAkG -A1UEBhMCVVMxEzARBgNVBAgTCk5ldyBNZXhpY28xFDASBgNVBAcTC0FsYnVxdWVy -cXVlMRUwEwYDVQQKEwxBMUEgQ2FyIFdhc2gxJDAiBgNVBAsTG0luZm9ybWF0aW9u -IFRlY2hub2xvZ3kgRGVwLjENMAsGA1UEAxMEbGRhcDB2MBAGByqGSM49AgEGBSuB -BAAiA2IABOuCubglyL3JaHnLsDbIwxQURbh9LdAAwz7llR3gNTj0pB9W1uIzQjOI -A1oNL90+KgGAoC8NgSb4OgBr9KDE9fBNogAajb+sKl8GZai1mh4eIvIqV0UwH3/1 -McluVuZfeqOBkTCBjjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH -AwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKLBa0vISpbF4Kfg -1MhX5Xd9KcT6MB8GA1UdIwQYMBaAFE+l6XolXDAYnGLTl4W6ULKHrm74MA8GA1Ud -EQQIMAaCBGxkYXAwCgYIKoZIzj0EAwMDaAAwZQIxAMB98Pbr3Xnl6NNTU2zjYtup -lY7Ztefzz3f8W09DbvjuV2V44zOu/wgKCC2AneTFGwIwOI3agBUo+qNHjgg64E/O -tJoVHVJNgiZsGJT9vGi34nNO2a+nyOwSKkwJsnoWrPom ------END CERTIFICATE----- diff --git a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.crt b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.crt index c891c096..7e5db96b 100644 --- a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.crt +++ b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.crt @@ -1,24 +1,24 @@ -----BEGIN CERTIFICATE----- -MIIEFTCCAf0CCQDaFbrAJZZnlzANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQGEwJM -SzEQMA4GA1UECAwHV0VTVEVSTjESMBAGA1UECgwJTFNGLCBJbmMuMRIwEAYDVQQD -DAlsb2NhbC5jb20wHhcNMTkwNjE3MDQ1NjQ3WhcNMjAxMDI5MDQ1NjQ3WjBSMQsw -CQYDVQQGEwJMSzEQMA4GA1UECAwHV0VTVEVSTjESMBAGA1UECgwJTFNGLCBJbmMu +MIIEFTCCAf0CCQD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ofzcDOctsraV8q/0DUlaK7zlSGJ+Sh +syAYOsUXjVHhIL37/VrH3FJ/R8MfOXno3nRgOweA9xOIX8CmPh2VepRmq31cpMNg +whn5svKux137VvzDMm3ZRGetsSU+ZpEIRdAWgGaOzAJJi6nGHe/p2fEQV/wMnawS +yTjOhnDC4F+czKgUtR3B2GdzqfDouPp/16xuO9QfIgGsNhH9RQsXQ6Kak5OTQSJT +rb1o0O69WdnwCaRDlyPZIQ5qaIjn7CGLcmoXus2IexxJbrCfJYB1ddfln8u6tdjW +oY6aQcTk5gX/EIdG7UupPxeLKk8VPFAgcobiyNkTnfEC4VpE4S3Aiiw= -----END CERTIFICATE----- diff --git a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.csr b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.csr index 96ba617f..10ff5f9f 100644 --- a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.csr +++ b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.csr @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE REQUEST----- -MIIClzCCAX8CAQAwUjELMAkGA1UEBhMCTEsxEDAOBgNVBAgMB1dFU1RFUk4xEjAQ -BgNVBAoMCUxTRiwgSW5jLjEdMBsGA1UEAwwUY29wcGVyLm9wZW5zb3VyY2UubGsw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJhgIt4sxJ/ZAy5fe3fb6c -Wf9llJsnTKMexegZfH1WSx3hWxv8U3rpkFh8O5LHnTdauYDxKXbIUWtXfb0yLNxs -e9NdL27f+gMkj1899jHzfW6qzVZ+yP52nnA9/fUSkRcrBhulY7NT4+iUCXDecErK -So0x1V8ascWLgevcl686Osi6lOA9KAsu4ziNYGLyihWTHPWO977AApz+5aJJZ4uw -ieyVhxnGqsnG7PSh/Ocxi/HhGhRA0L0y7Zny11xaX+8C8aYuStFp3wokjqkDBXdr -uWvRHfY8EZiGfidoJj8zHDuuBtrWoT/tx+2Yr6hnLNkfftqBFNr26V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ONACAjg5NSYTOopMigFGtaBzEcTuFd12omxsU5iBz7947jqDyZMS +MzPrpCXwQMuLRXh/jrbrVDD1c8mr77yVWBVeG0Q44ZIsUp8UdVWaY9gUyfp1YXMF +4a2DLcBMYk5evChSwFctze9Kw0eGfe7WqN4/vguDpfBA4HgxEcHBxtdf6INdSKh6 +VZXjCOJo6bRYkqssWgVzZEIvYTGoWouBSc7sKmOCFIVD4Y9nZ5CAYKW+zg== -----END CERTIFICATE REQUEST----- diff --git a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.key b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.key index f0985220..3becae0a 100644 --- a/copper-server/kubernetes/deployment/tls/copper.opensource.lk.key +++ b/copper-server/kubernetes/deployment/tls/copper.opensource.lk.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAyYYCLeLMSf2QMuX3t32+nFn/ZZSbJ0yjHsXoGXx9Vksd4Vsb -/FN66ZBYfDuSx503WrmA8Sl2yFFrV329MizcbHvTXS9u3/oDJI9fPfYx831uqs1W -fsj+dp5wPf31EpEXKwYbpWOzU+PolAlw3nBKykqNMdVfGrHFi4Hr3JevOjrIupTg -PSgLLuM4jWBi8ooVkxz1jve+wAKc/uWiSWeLsInslYcZxqrJxuz0ofznMYvx4RoU -QNC9Mu2Z8tdcWl/vAvGmLkrRad8KJI6pAwV3a7lr0R32PBGYhn4naCY/Mxw7rgba -1qE/7cftmK+oZyzZH37agRTa9ulRFreMbHwKlQIDAQABAoIBAD8nSeOLYa4GUnxA -6UKNm4BwC8OPsJe+QphQOQ5Tnwu9+p026ixHFQvA+pnkKXl44XIDFE9/SQQ5z8PZ -WcMxn9o3a+OWC88REI8ShyxpzPmbY2UPeH2/C0+tE0u6HGU3JuWKwnswJXCyyZ4q -3z42PpnqhxkI3wcEkv3HN10oA/fhCc4/n1np2k0QUP91IVT3k9NqdX19NZRXVEAA -RlWTM3EfoyRN/OTEiUHvp0UQ9jebVZes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9kAndiTHz0PwkXNOUu +em104yon8O/xMm93qYt82rPZKtV0nxurGythkMMdLSmsxDdyAMpgyblTEhbEoWnF +sw2+zs3Cltf/hBdJ/QTagQKBgQCRI99gllejDIlMNlYdKbBJuyXB8bEVhYoF0EUa +ROd2tMfi+YCuWUCKpFDV/RexUKelOUqg8zfIT4xQD0GeWxW8cUw2ItgbwaTzUPng +NojblST1dWf5/xuJUJOtO2IJNxpEJEN29YtcAUqGnuu3CKJOGTHSrl5aiHaoRudQ +UpqDnQKBgB9gW8yMATdenNniS4F4SupqfONGfSTpUJfgt738Qd51u5pfdKHReDHN +Y2RF+sSzksOxszg8OtmkcflZhLVtagytygJfxgAe7rW9p6alvkDp1j1EnZj3MfZ2 +VwgIkfQ4pBwQe+1swlqhdlUhWd2/g0H8f8ZFDRudaGMJt6d+8nBL -----END RSA PRIVATE KEY----- diff --git a/copper-server/kubernetes/deployment/tls/dhparam.pem b/copper-server/kubernetes/deployment/tls/dhparam.pem index 41d7cf94..8a2d2315 100644 --- a/copper-server/kubernetes/deployment/tls/dhparam.pem +++ b/copper-server/kubernetes/deployment/tls/dhparam.pem @@ -1,8 +1,8 @@ -----BEGIN DH PARAMETERS----- -MIIBCAKCAQEA2+h9dwn8AZw5WY+02atRb3PPSJ8mdaRkiSCHU8aI93HsmWC7uZvW -YTaHs5h+QcOhwB9YoKgw3P6D4VXGJfoGtQKdP8uZgFW3xIi6nAiLvshi4qscaVRl -rn0UqQzM5yQA+q0YaIdvBzhPhyWrqdXToCVYU4m1ZNlFJJHz6kmc2spuMixRbglX -nHIsUwfde7t3MJAGVI4LKPMNt0L2UxP89TyBV/98m+KgcS/Xpy1m/lUP9BE91rIt -yFcuXdS2UvK57usQl0tOgwSsSwE5dicPnl5VJ5ypAAcpE9RyS2iHRs/ofixaZOmJ -GOe3J4x2z80wWSyh6h8Vq5EPbSojMaRIIwIBAg== +MIIBCAKCAQEA7AMwqtvXNgHxV6a5s9pJUVn3x0Is9qWQ+iTkMPBMxWgdn0/aNob8 +LSaYrmf99sk0llaMyN3kQ7xABu9H/fQz7L1WJX1cTpsq8iZ7PTcbGBaIGqSouggn +RBORs4iDXuS/7oigeFd1COloA1x1/zCDL8YJOxk/ds6AgKiBEAzEIGQGfMlOh607 +oQlR24++HrziGQalyw9D6CdL/fbrwu+yim/g98pLeKz5PF5WnCOGvA+sCpnGgb/5 +kWfb0vQEGjZOcMA5qpt5k9+LMOAU7QrLcwSjE6BExDCCQmlllsaBwagxZMBWKhjg +vOrmYy9VoVMTipsJMuM/zs+UWv7f8NlJowIBAg== -----END DH PARAMETERS----- diff --git a/copper-server/kubernetes/deployment/tls/fullchain.pem b/copper-server/kubernetes/deployment/tls/fullchain.pem deleted file mode 120000 index cf7a60f4..00000000 --- a/copper-server/kubernetes/deployment/tls/fullchain.pem +++ /dev/null @@ -1 +0,0 @@ -/container/service/:ssl-tools/assets/default-ca/default-ca.pem \ No newline at end of file diff --git a/copper-server/kubernetes/deployment/tls/privkey.pem b/copper-server/kubernetes/deployment/tls/privkey.pem deleted file mode 100644 index 7c56df39..00000000 --- a/copper-server/kubernetes/deployment/tls/privkey.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIGkAgEBBDCEWPvPbS3bau6wWiVCDHd4fKsyYq9q3xdTfef7RuNh+RLr+W2YNVSI -CChTlZ0VSoegBwYFK4EEACKhZANiAATrgrm4Jci9yWh5y7A2yMMUFEW4fS3QAMM+ -5ZUd4DU49KQfVtbiM0IziANaDS/dPioBgKAvDYEm+DoAa/SgxPXwTaIAGo2/rCpf -BmWotZoeHiLyKldFMB9/9THJblbmX3o= ------END EC PRIVATE KEY----- diff --git a/copper-server/kubernetes/deployment/tls/rootCA.crt b/copper-server/kubernetes/deployment/tls/rootCA.crt index 8b06db97..bcca567f 100644 --- a/copper-server/kubernetes/deployment/tls/rootCA.crt +++ b/copper-server/kubernetes/deployment/tls/rootCA.crt @@ -1,29 +1,29 @@ -----BEGIN CERTIFICATE-----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vVyDc5wPW1zNhAcnAeDzoX +sTPeaDM3Hcs6XJ/eKNhBAW5/sizVAovcpA92RkXr9s4fdWakVfzcVbyt5EUvVYDS +1H3Wde6fg5lQdRkdW3p5GAA8/T2fj2b4qRvtYYM39hAAaNwCbVNp7E37JbBcaZ9X +DY/PPoDyPN3jWilcl5j/XKtKZ68GWuMSllvMIBoWLWOdat9OsB067MHW3nJeJA== -----END CERTIFICATE----- diff --git a/copper-server/kubernetes/deployment/tls/rootCA.key b/copper-server/kubernetes/deployment/tls/rootCA.key index 281c9830..d7a59597 100644 --- a/copper-server/kubernetes/deployment/tls/rootCA.key +++ b/copper-server/kubernetes/deployment/tls/rootCA.key @@ -1,51 +1,51 @@ -----BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEAwgKHKi8yzkFVQrF/KSaXHkh5lvfrRdfAE2mWCgojpsLbf7iZ -/TOio5mPb598l0xIVlV0O7yMv9UyAl9QECw9bg5VK9rXSwfsOFToXCC60UYxHq+7 -VIddD5HR2bnHibvYYfgLiM0nbXZhtftRqcO2TAhzW2jmFLo/TIJTsrSEs5FxKi1l -1faCKuvJRx+6Zztu+LdMhG/PhXTIv4B1kuh/Qdk+NNmqlkAYhm+1aMF6KIN4oiiv -UvppSFKKeQgSzZmAS9VAx+K9pIArwVxPJqS0qP21QljlpYAkVWMoRO/JcW5nVxwn -vseAfe4r2vy2RmoM5qykUfuvqHsQIQlK1t+FEp878OvLvcyv/WIoma4ZKNse4OId -q+oAVN7AjwUt0Mf3dwOGgrehBqj/ZXUZYgbpbmGLESwGhDw6hughEoCnS0y8kJhH -3F7nKPkd2HNcXH3vWATNGWSSooqzkUPhDgyc6wP4px2SfrKiSleNZPmzeWUP8Fq+ -R0fOoUAJkXGXoIK8/BnuVL+qW879scoTQJTWC1iIuji9f0GkS60ER4OjklVcjk0D -Clbrt2WNziNUPYCC+dLDB2+0EKOtu83oyhB0YMUvs7hK1lV7Rsx1ussTS2bj9sGs -GBQvvmR/WOxuhIpj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ZOch1hGdu7NPii0DTfoCAMzXjSnRE2hAoIBAHFI87NG95EabbdeKEJnRtTUJqeo +1a8yUhcAiOKQNOyKFabEo8sYomFM1KE6pidsfQkZFfDwWjw26hi2Ddq3lDzFIXbD +mx0L7SkacFNzdjelKO7apSBmeyXsdXKsB06N436wdmDseTCo3Y+9CRXsH/lKNIy3 +lwvDRcDXU3r7rDoTTUlLUwC7FozDeJ821i3RH+pMk/mnpMwDw75pCkST4h2yt6wj +KnBa8+nT+KS03+x0igx9IhOjkqs0BX2g29X1RoDKJgkO4M1E3IhIgNEg9mr1gTgb +umbh3/qKmhUcHZv6CtrzF/9qIPcbdVni0jSHwB2+phtMlplOMOJqkhXcDlM= -----END RSA PRIVATE KEY----- diff --git a/copper-server/kubernetes/deployment/tls/rootCA.srl b/copper-server/kubernetes/deployment/tls/rootCA.srl index af234839..b9e8c659 100644 --- a/copper-server/kubernetes/deployment/tls/rootCA.srl +++ b/copper-server/kubernetes/deployment/tls/rootCA.srl @@ -1 +1 @@ -DA15BAC025966797 +F6578F9F73E3EDCD diff --git a/copper-server/kubernetes/prometheus-alert/AlertManagerConfigmap.yaml b/copper-server/kubernetes/prometheus-alert/AlertManagerConfigmap.yaml deleted file mode 100755 index 738cef24..00000000 --- a/copper-server/kubernetes/prometheus-alert/AlertManagerConfigmap.yaml +++ /dev/null @@ -1,38 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: alertmanager-config - namespace: copper -data: - config.yml: |- - global: - templates: - - '/etc/alertmanager/*.tmpl' - route: - receiver: alert-emailer - group_by: ['alertname', 'priority'] - group_wait: 10s - repeat_interval: 30m - routes: - - receiver: slack_demo - # Send severity=slack alerts to slack. - match: - severity: slack - group_wait: 10s - repeat_interval: 1m - - receivers: - - name: alert-emailer - email_configs: - #- to: demo@devopscube.com - - to: copper@copper.mail.lk - send_resolved: false - #from: from-email@email.com - #smarthost: email-host-here - from: copper@copper.mail.lk - smarthost: smtp.gmail.com - require_tls: false - - name: slack_demo - slack_configs: - - api_url: https://hooks.slack.com/services/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sz4Qk - channel: '#devopscube-demo' diff --git a/copper-server/kubernetes/prometheus-alert/AlertTemplateConfigMap.yaml b/copper-server/kubernetes/prometheus-alert/AlertTemplateConfigMap.yaml deleted file mode 100755 index ac37a3bf..00000000 --- a/copper-server/kubernetes/prometheus-alert/AlertTemplateConfigMap.yaml +++ /dev/null @@ -1,178 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - creationTimestamp: null - name: alertmanager-templates - namespace: copper -data: - default.tmpl: | - {{ define "__alertmanager" }}AlertManager{{ end }} - {{ define "__alertmanagerURL" }}{{ .ExternalURL }}/#/alerts?receiver={{ .Receiver }}{{ end }} - {{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }} - {{ define "__description" }}{{ end }} - {{ define "__text_alert_list" }}{{ range . }}Labels: - {{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }} - {{ end }}Annotations: - {{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }} - {{ end }}Source: {{ .GeneratorURL }} - {{ end }}{{ end }} - {{ define "slack.default.title" }}{{ template "__subject" . }}{{ end }} - {{ define "slack.default.username" }}{{ template "__alertmanager" . }}{{ end }} - {{ define "slack.default.fallback" }}{{ template "slack.default.title" . }} | {{ template "slack.default.titlelink" . }}{{ end }} - {{ define "slack.default.pretext" }}{{ end }} - {{ define "slack.default.titlelink" }}{{ template "__alertmanagerURL" . }}{{ end }} - {{ define "slack.default.iconemoji" }}{{ end }} - {{ define "slack.default.iconurl" }}{{ end }} - {{ define "slack.default.text" }}{{ end }} - {{ define "hipchat.default.from" }}{{ template "__alertmanager" . }}{{ end }} - {{ define "hipchat.default.message" }}{{ template "__subject" . }}{{ end }} - {{ define "pagerduty.default.description" }}{{ template "__subject" . }}{{ end }} - {{ define "pagerduty.default.client" }}{{ template "__alertmanager" . }}{{ end }} - {{ define "pagerduty.default.clientURL" }}{{ template "__alertmanagerURL" . }}{{ end }} - {{ define "pagerduty.default.instances" }}{{ template "__text_alert_list" . }}{{ end }} - {{ define "opsgenie.default.message" }}{{ template "__subject" . }}{{ end }} - {{ define "opsgenie.default.description" }}{{ .CommonAnnotations.SortedPairs.Values | join " " }} - {{ if gt (len .Alerts.Firing) 0 -}} - Alerts Firing: - {{ template "__text_alert_list" .Alerts.Firing }} - {{- end }} - {{ if gt (len .Alerts.Resolved) 0 -}} - Alerts Resolved: - {{ template "__text_alert_list" .Alerts.Resolved }} - {{- end }} - {{- end }} - {{ define "opsgenie.default.source" }}{{ template "__alertmanagerURL" . }}{{ end }} - {{ define "victorops.default.message" }}{{ template "__subject" . }} | {{ template "__alertmanagerURL" . }}{{ end }} - {{ define "victorops.default.from" }}{{ template "__alertmanager" . }}{{ end }} - {{ define "email.default.subject" }}{{ template "__subject" . }}{{ end }} - {{ define "email.default.html" }} - - - - - - - {{ template "__subject" . }} - - - - - - - - -
-
- - - - - - - -
- {{ .Alerts | len }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} for {{ range .GroupLabels.SortedPairs }} - {{ .Name }}={{ .Value }} - {{ end }} -
- - - - - {{ if gt (len .Alerts.Firing) 0 }} - - - - {{ end }} - {{ range .Alerts.Firing }} - - - - {{ end }} - {{ if gt (len .Alerts.Resolved) 0 }} - {{ if gt (len .Alerts.Firing) 0 }} - - - - {{ end }} - - - - {{ end }} - {{ range .Alerts.Resolved }} - - - - {{ end }} -
- View in {{ template "__alertmanager" . }} -
- [{{ .Alerts.Firing | len }}] Firing -
- Labels
- {{ range .Labels.SortedPairs }}{{ .Name }} = {{ .Value }}
{{ end }} - {{ if gt (len .Annotations) 0 }}Annotations
{{ end }} - {{ range .Annotations.SortedPairs }}{{ .Name }} = {{ .Value }}
{{ end }} - Source
-
-
-
-
-
- [{{ .Alerts.Resolved | len }}] Resolved -
- Labels
- {{ range .Labels.SortedPairs }}{{ .Name }} = {{ .Value }}
{{ end }} - {{ if gt (len .Annotations) 0 }}Annotations
{{ end }} - {{ range .Annotations.SortedPairs }}{{ .Name }} = {{ .Value }}
{{ end }} - Source
-
-
-
-
- - - {{ end }} - {{ define "pushover.default.title" }}{{ template "__subject" . }}{{ end }} - {{ define "pushover.default.message" }}{{ .CommonAnnotations.SortedPairs.Values | join " " }} - {{ if gt (len .Alerts.Firing) 0 }} - Alerts Firing: - {{ template "__text_alert_list" .Alerts.Firing }} - {{ end }} - {{ if gt (len .Alerts.Resolved) 0 }} - Alerts Resolved: - {{ template "__text_alert_list" .Alerts.Resolved }} - {{ end }} - {{ end }} - {{ define "pushover.default.url" }}{{ template "__alertmanagerURL" . }}{{ end }} - slack.tmpl: | - {{ define "slack.devops.text" }} - {{range .Alerts}}{{.Annotations.DESCRIPTION}} - {{end}} - {{ end }} - diff --git a/copper-server/kubernetes/prometheus-alert/Deployment.yaml b/copper-server/kubernetes/prometheus-alert/Deployment.yaml deleted file mode 100755 index 61c692fb..00000000 --- a/copper-server/kubernetes/prometheus-alert/Deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: alertmanager - namespace: copper -spec: - replicas: 1 - selector: - matchLabels: - app: alertmanager - template: - metadata: - name: alertmanager - labels: - app: alertmanager - spec: - containers: - - name: alertmanager - image: lsflk/copper:prom_alertmanager - args: - - "--config.file=/etc/alertmanager/config.yml" - - "--storage.path=/alertmanager" - ports: - - name: alertmanager - containerPort: 9093 - volumeMounts: - - name: config-volume - mountPath: /etc/alertmanager - - name: templates-volume - mountPath: /etc/alertmanager-templates - - name: alertmanager - mountPath: /alertmanager - volumes: - - name: config-volume - configMap: - name: alertmanager-config - - name: templates-volume - configMap: - name: alertmanager-templates - - name: alertmanager - emptyDir: {} diff --git a/copper-server/kubernetes/prometheus-alert/README.md b/copper-server/kubernetes/prometheus-alert/README.md deleted file mode 100755 index 55c20f84..00000000 --- a/copper-server/kubernetes/prometheus-alert/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# kubernetes-prometheus-Alertmanager -Configuration files for setting up prometheus monitoring on Kubernetes cluster and alertmanager - -Source files are taken from following site. https://devopscube.com/setup-prometheus-monitoring-on-kubernetes/ - - - In copper Email solution we deploy this solution as a series of kubectl commands. - You may see various command that should be used for managing prometheus based alertmanager. - -# prometheus-alert - -- kubectl create namespace monitoring -- kubectl create -f prometheus-alert/clusterRole.yaml -- kubectl create -f prometheus-alert/config-map.yaml -n monitoring -- kubectl create -f prometheus-alert/prometheus-deployment.yaml --namespace=monitoring - -## check all pods in monitoring namespace -- kubectl get deployments --namespace=monitoring - -- kubectl get pods --namespace=monitoring -- kubectl port-forward prometheus-deployment-67d56fb57f-j5ldz 8989:9090 -n monitoring - -- kubectl create -f prometheus-alert/prometheus-service.yaml --namespace=monitoring - - -## alert manager -- kubectl create -f prometheus-alert/AlertManagerConfigmap.yaml -- kubectl create -f prometheus-alert/AlertTemplateConfigMap.yaml -- kubectl create -f prometheus-alert/Deployment.yaml -- kubectl create -f prometheus-alert/Service.yaml - -## how to get services in monitoring namespace -- kubectl get services --namespace=monitoring -- kubectl get configmap --namespace=monitoring - - -## deleting services -- kubectl delete services alertmanager --namespace=monitoring -- kubectl delete services prometheus-service --namespace=monitoring -## deleting configmaps -- kubectl delete configmap alertmanager-config --namespace=monitoring -- kubectl delete configmap alertmanager-templates --namespace=monitoring -- kubectl delete configmap prometheus-server-conf --namespace=monitoring -## deleting cluster roll -- kubectl delete clusterroles prometheus -- kubectl delete clusterrolebindings prometheus -## deleting deployments -- kubectl delete deployment alertmanager --namespace=monitoring -- kubectl delete deployment prometheus-deployment --namespace=monitoring - - diff --git a/copper-server/kubernetes/prometheus-alert/Service.yaml b/copper-server/kubernetes/prometheus-alert/Service.yaml deleted file mode 100755 index 57cda90d..00000000 --- a/copper-server/kubernetes/prometheus-alert/Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: alertmanager - namespace: copper - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: / - prometheus.io/port: '8080' -spec: - selector: - app: alertmanager - type: NodePort - ports: - - port: 9093 - targetPort: 9093 - nodePort: 31000 diff --git a/copper-server/kubernetes/prometheus-alert/clusterRole.yaml b/copper-server/kubernetes/prometheus-alert/clusterRole.yaml deleted file mode 100755 index cc70e2a1..00000000 --- a/copper-server/kubernetes/prometheus-alert/clusterRole.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: prometheus -rules: -- apiGroups: [""] - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - verbs: ["get", "list", "watch"] -- apiGroups: - - extensions - resources: - - ingresses - verbs: ["get", "list", "watch"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: prometheus -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: prometheus -subjects: -- kind: ServiceAccount - name: default - namespace: copper diff --git a/copper-server/kubernetes/prometheus-alert/config-map.yaml b/copper-server/kubernetes/prometheus-alert/config-map.yaml deleted file mode 100755 index d9f67af4..00000000 --- a/copper-server/kubernetes/prometheus-alert/config-map.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: prometheus-server-conf - labels: - name: prometheus-server-conf - namespace: copper -data: - prometheus.rules: |- - groups: - - name: devopscube demo alert - rules: - - alert: High Pod Meory - expr: sum(container_memory_usage_bytes) > 1 - for: 1m - labels: - severity: slack - annotations: - summary: High Memory Usage - prometheus.yml: |- - global: - scrape_interval: 5s - evaluation_interval: 5s - rule_files: - - /etc/prometheus/prometheus.rules - alerting: - alertmanagers: - - scheme: http - static_configs: - - targets: - - "alertmanager.monitoring.svc:9093" - - scrape_configs: - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - scheme: https - - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - scheme: https - - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - - - job_name: 'kubernetes-pods' - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - - - job_name: 'kubernetes-cadvisor' - - scheme: https - - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor - - - job_name: 'kubernetes-service-endpoints' - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name diff --git a/copper-server/kubernetes/prometheus-alert/prometheus-deployment.yaml b/copper-server/kubernetes/prometheus-alert/prometheus-deployment.yaml deleted file mode 100755 index ff9ea556..00000000 --- a/copper-server/kubernetes/prometheus-alert/prometheus-deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: prometheus-deployment - namespace: copper -spec: - replicas: 1 - template: - metadata: - labels: - app: prometheus-server - spec: - containers: - - name: prometheus - image: lsflk/copper:prometheus - args: - - "--config.file=/etc/prometheus/prometheus.yml" - - "--storage.tsdb.path=/prometheus/" - ports: - - containerPort: 9090 - volumeMounts: - - name: prometheus-config-volume - mountPath: /etc/prometheus/ - - name: prometheus-storage-volume - mountPath: /prometheus/ - volumes: - - name: prometheus-config-volume - configMap: - defaultMode: 420 - name: prometheus-server-conf - - - name: prometheus-storage-volume - emptyDir: {} diff --git a/copper-server/kubernetes/prometheus-alert/prometheus-service.yaml b/copper-server/kubernetes/prometheus-alert/prometheus-service.yaml deleted file mode 100755 index fe87bd2b..00000000 --- a/copper-server/kubernetes/prometheus-alert/prometheus-service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: prometheus-service - namespace: copper - annotations: - prometheus.io/scrape: 'true' - prometheus.io/path: / - prometheus.io/port: '8080' - -spec: - selector: - app: prometheus-server - type: NodePort - ports: - - port: 8080 - targetPort: 9090 - nodePort: 30000 diff --git a/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.fullchain.pem b/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.fullchain.pem index 40475b1d..89dea8b2 100755 --- a/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.fullchain.pem +++ b/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.fullchain.pem @@ -1,33 +1,33 @@ -----BEGIN CERTIFICATE----- -MIIFrDCCA5SgAwIBAgIJAPtkmdJZ8j9PMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNV +MIIFrDCCA5SgAwIBAgIJALygAZmYNu69MA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNV BAYTAlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMQwwCgYD VQQKDANsc2YxDDAKBgNVBAsMA09yZzEcMBoGA1UEAwwTbWFpbC5jb3BwZXIubWFp -bC5sazAeFw0xOTA2MTkyMzAzMTFaFw0yMDA2MTgyMzAzMTFaMGsxCzAJBgNVBAYT +bC5sazAeFw0xOTA2MjQwMzI4NTZaFw0yMDA2MjMwMzI4NTZaMGsxCzAJBgNVBAYT AlVTMQ8wDQYDVQQIDAZPcmVnb24xETAPBgNVBAcMCFBvcnRsYW5kMQwwCgYDVQQK DANsc2YxDDAKBgNVBAsMA09yZzEcMBoGA1UEAwwTbWFpbC5jb3BwZXIubWFpbC5s -azCCAiIwDQYJKoZ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i19cNAp/kzreYIaslnP2HKLwYK/oy4tVWiLfjZ1EGI98Aekcewywt24t+4mT/t +2XQWFDeH2DHRUnF+BOBJtB2hkzWQUTLjanRDoJ56FhSnWd/AGy2JAscifI6JCzUt +QdBEQ8L0n8XRWmJgcGx38U+9AgMBAAGjUzBRMB0GA1UdDgQWBBSIyYME+XfEwPjf +qOKYRJjlol4YCzAfBgNVHSMEGDAWgBSIyYME+XfEwPjfqOKYRJjlol4YCzAPBgNV +HRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQBNrk4yM8nVy4QIu3z4GpV/ +BULkkDOqIHwQB04W4XzKohpT7bFsFSh6Tkb+ovi974Fxhuk/RKPAzZuVqGbYIVQc +QroamMQVgL1p2TqQcf5RzUW1Zvg7lnjEBG2Eebt04dSo648V6uqM8lx4mQGVg8IH +VFgdz+akrt2GuqFBI5AcuIwjX2RFdfbzg3bi92zdxms+k1p55yd87jmnKVmfyB5a +dtIbaeEVVOfWMgiZ1pvM+zx2f7kMP7w9tvjnn0Lqx2THGVt2yQVayqPkewudiZVG +wvdnYWJFP2O2A/M5Fr9qx0dMXeK6Ndiw/SomjlVV2MQeK2TVDX3+WVjYhc1Iy9kq +sRjqHSNdJWQX/c4GSeb1iTZnSP+SjoVhoOoBcfMdUi6NCL+4U/fE8Ty7M07yHhH+ +rMqktGQuqMocZ8PtNIVJi8QNwUzSnsXrml6FSX3wAZQMemWQEmPfMby8zviZDkid +J4xeSOiejnA8MIUqw5FAVg3BGjajJqd0Odr1grwlCNQM5573uw8PCValUu+02dUR +gDvlVon8WFBK6RC1qrhqjd6h2akVsNIL/AJF0Ula4IogaX6FsrpcAaCuQnGE4Kho +jlOrmataDDDO8wwuNNiXV1Mm+yL3n1jPb5CinrtbolXDdM427khLuySALIfFSLgU +bYWieEFc8zY64Ex0FZobPA== -----END CERTIFICATE----- diff --git a/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.privkey.pem b/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.privkey.pem index 914011e6..654477e2 100755 --- a/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.privkey.pem +++ b/copper-server/kubernetes/tls/letsencrypt/live/mail.copper.mail.lk/.privkey.pem @@ -1,52 +1,52 @@ -----BEGIN PRIVATE KEY----- -MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDKtamDbkRGze3G -BgXRH2oVj5Dwmw/YElJPGOO3RaPulwBvZNnPUimcnjJXhafgN7ABuJZ5MK8ldH2R -ps1bS3EcIC9sIKkdVKQdAyr6hP6k4MNdHA/TiM0SbLtEnOBDkuqN2GVH2o8OQJmy -R3q3cKO7PkjjVUUecNZ1v1E6ro6yztDgDHzbJ41zf1dlvawvdj0rG2zj1/JeVPW8 -E3szz2SyOkG2SZhwjm4LEBCHglh+nk+9WqW260/VWfwgkirxkZCQm+d73oxB1/6m -67z0iutGs2V1ng9mwvu2z6fwxZzamqM3KsPhL8bQLFE482QVVzvVCCszbhXuuBZv -EMqprmygxw5ADym/0cA1Q5lfHnMJvizM1hy2aI6mT5vZB315QKHmNIhjsMQEjSri -RpfPpW78fqAIMbiBHdpCUz7nZvFD2EhYPey8GAqE5GQ5zJ/HpbMgyKPo81esoIM1 -ozYPKHA9b8fH0hs+q5Cj2Ejx0F6eIrs0qMq7u7DZ59KIFw8JBYKdG430ofrL5fZx -cp9EYpS6i2eIHpr4hM9dZdhbSmwAXFIgsPgWlRydRscgyoGwT3z5qIIpZnOTFRmA -0krhaB/4y50WxHdD97t47yboLa9RWwU7nNtOqMWeOdUY69065CR8JnB37esfAuDs -Bas2RPYXjKabONKNl0eMtv2w7Au/QQIDAQABAoICAQClDTmTDIuHY1GBdZHy7rNA -Dv+jCX7jHjfqs4dmyMtsD4OJMAKxbmL3ZU/0N52zUWR8YkITN3LE+o7rs3duKIVW -s1YpooZQnYRrIxMxnGyC74fjHmA8ixz/LY1llp58JvnYuSPuV6U3o54BrXXcO1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aFPRnt0saiBI83Ih +EalOGruGXZ6Ah3J83dNz7TfX3R1Gfjqt3tN1vw/J5uodfgmxpMzRdFSFVbNtwISr +sxkuz7lZIjqugytBVibm0jENdow9vTV8+bmiN5tZjKMNchPpgPHDQMWFWTmNRy5d +B5EEl6Sp9OE56vG/+xog2giL02gdEHw= -----END PRIVATE KEY----- From d3a73802c3895dc83e0a6ffecc0f889b4e4b9a68 Mon Sep 17 00:00:00 2001 From: anuudb Date: Wed, 26 Jun 2019 08:58:30 +0530 Subject: [PATCH 2/6] Elastic alert dashboard upgraded to receive unbound mail alert --- .../dashboards/Kubernetes Pod Resources.json | 1793 ----------------- .../dashboards/elasticSearch_dashboard.json | 209 ++ .../{dashboard_1.json => k8s_dashboard.json} | 19 +- 3 files changed, 222 insertions(+), 1799 deletions(-) delete mode 100644 copper-hub/proemtheus_grafana/grafana-image/dashboards/Kubernetes Pod Resources.json create mode 100644 copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json rename copper-hub/proemtheus_grafana/grafana-image/dashboards/{dashboard_1.json => k8s_dashboard.json} (99%) diff --git a/copper-hub/proemtheus_grafana/grafana-image/dashboards/Kubernetes Pod Resources.json b/copper-hub/proemtheus_grafana/grafana-image/dashboards/Kubernetes Pod Resources.json deleted file mode 100644 index bb9e43bc..00000000 --- a/copper-hub/proemtheus_grafana/grafana-image/dashboards/Kubernetes Pod Resources.json +++ /dev/null @@ -1,1793 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Shows resource usage of Kubernetes pods.", - "editable": true, - "gnetId": 737, - "graphTooltip": 0, - "id": 100, - "iteration": 1560811902771, - "links": [], - "panels": [ - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 520000000 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10s", - "now" - ] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10s", - "frequency": "1m", - "handler": 1, - "message": "Node memory active alert", - "name": "Node memory active alert", - "noDataState": "alerting", - "notifications": [ - { - "uid": "ec4m9OnWz" - } - ] - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 16, - "x": 0, - "y": 0 - }, - "id": 40, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(node_memory_Active_file)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 520000000 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Node memory active", - "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": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 0 - }, - "height": "180px", - "id": 7, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_fs_usage_bytes{id=\"/\",instance=~\"^$instance$\"}) / sum(container_fs_limit_bytes{id=\"/\",instance=~\"^$instance$\"}) * 100", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "timeFrom": "1m", - "timeShift": null, - "title": "Filesystem Usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 20 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10s", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10s", - "frequency": "1m", - "handler": 1, - "message": "Service count is not enough", - "name": "Service count alert", - "noDataState": "alerting", - "notifications": [ - { - "uid": "ec4m9OnWz" - } - ] - }, - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 16, - "x": 0, - "y": 7 - }, - "id": 38, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": {}, - "percentage": false, - "pluginVersion": "6.3.0-pre", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "count(kube_service_info)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 20 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Service count", - "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": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 14.5 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "10s", - "now" - ] - }, - "reducer": { - "params": [], - "type": "sum" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "10s", - "frequency": "1m", - "handler": 1, - "message": "Cpu usage is above maximum", - "name": "Cpu Usage alert", - "noDataState": "alerting", - "notifications": [ - { - "uid": "ec4m9OnWz" - } - ] - }, - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 7 - }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pluginVersion": "6.3.0-pre", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\",instance=~\"^$instance$\"}[1m])) / sum (machine_cpu_cores{instance=~\"^$instance$\"}) * 100", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 14.5 - } - ], - "timeFrom": "1m", - "timeRegions": [], - "timeShift": null, - "title": "Cpu Usage", - "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": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 15 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 10, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (machine_memory_bytes{instance=~\"^$instance$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 35, - "panels": [], - "title": "all pods", - "type": "row" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 19 - }, - "height": "180px", - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{id=\"/\",instance=~\"^$instance$\"}) / sum (machine_memory_bytes{instance=~\"^$instance$\"}) * 100", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 2 - } - ], - "thresholds": "65, 90", - "timeFrom": "1m", - "timeShift": null, - "title": "Memory Working Set", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 19 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 11, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": " cores", - "postfixFontSize": "30%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",instance=~\"^$instance$\"}[1m]))", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "timeShift": null, - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 19 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 13, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_fs_usage_bytes{id=\"/\",instance=~\"^$instance$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 19 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 9, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "20%", - "prefix": "", - "prefixFontSize": "20%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(container_memory_working_set_bytes{id=\"/\",instance=~\"^$instance$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 22 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 12, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": " cores", - "postfixFontSize": "30%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (machine_cpu_cores{instance=~\"^$instance$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 22 - }, - "height": "1px", - "hideTimeOverride": true, - "id": 14, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum (container_fs_limit_bytes{id=\"/\",instance=~\"^$instance$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "timeFrom": "1m", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 25 - }, - "height": "200px", - "id": 32, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_receive_bytes_total{instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m]))", - "interval": "", - "intervalFactor": 2, - "legendFormat": "receive", - "metric": "network", - "refId": "A", - "step": 240 - }, - { - "expr": "- sum(rate(container_network_transmit_bytes_total{instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m]))", - "interval": "", - "intervalFactor": 2, - "legendFormat": "transmit", - "metric": "network", - "refId": "B", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "transmit / receive", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 36, - "panels": [], - "title": "each pod", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 31 - }, - "height": "", - "id": 17, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": null, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m])) by (pod_name)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ pod_name }}", - "metric": "container_cpu", - "refId": "A", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cpu Usage", - "tooltip": { - "msResolution": true, - "shared": false, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 33, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": null, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}) by (pod_name)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ pod_name }}", - "metric": "", - "refId": "A", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory Working Set", - "tooltip": { - "msResolution": false, - "shared": false, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "used", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 45 - }, - "id": 16, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m])) by (pod_name)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ pod_name }} < in", - "metric": "network", - "refId": "A", - "step": 240 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m])) by (pod_name)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ pod_name }} > out", - "metric": "network", - "refId": "B", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network", - "tooltip": { - "msResolution": false, - "shared": false, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": "transmit / receive", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 52 - }, - "id": 34, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_fs_usage_bytes{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}) by (pod_name)", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{ pod_name }}", - "metric": "network", - "refId": "A", - "step": 240 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Filesystem", - "tooltip": { - "msResolution": false, - "shared": false, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "used", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 18, - "style": "dark", - "tags": [ - "kubernetes" - ], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "selected": true, - "text": "All", - "value": "$__all" - }, - "datasource": "prometheus", - "definition": "", - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": false, - "name": "instance", - "options": [], - "query": "label_values(instance)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "copper", - "value": [ - "copper" - ] - }, - "datasource": "prometheus", - "definition": "", - "hide": 0, - "includeAll": true, - "label": "Namespace", - "multi": true, - "name": "namespace", - "options": [], - "query": "label_values(namespace)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "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": "browser", - "title": "Kubernetes Pod Resources", - "uid": "VW1dXd7Zk", - "version": 70 -} \ No newline at end of file diff --git a/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json new file mode 100644 index 00000000..323b9b8a --- /dev/null +++ b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json @@ -0,0 +1,209 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 2, + "links": [], + "panels": [ + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 3 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "1m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "sum" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "30s", + "handler": 1, + "message": "Unbound mail(s) detected", + "name": "Unbound mails alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Elasticsearch", + "fill": 1, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*Host not found* AND beat.hostname:email", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 3 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Unbound mails", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 18, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "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": "", + "title": "Elastic", + "uid": "FV4Wjv4Wz", + "version": 15 +} \ No newline at end of file diff --git a/copper-hub/proemtheus_grafana/grafana-image/dashboards/dashboard_1.json b/copper-hub/proemtheus_grafana/grafana-image/dashboards/k8s_dashboard.json similarity index 99% rename from copper-hub/proemtheus_grafana/grafana-image/dashboards/dashboard_1.json rename to copper-hub/proemtheus_grafana/grafana-image/dashboards/k8s_dashboard.json index c90919c5..e23028f1 100644 --- a/copper-hub/proemtheus_grafana/grafana-image/dashboards/dashboard_1.json +++ b/copper-hub/proemtheus_grafana/grafana-image/dashboards/k8s_dashboard.json @@ -17,7 +17,7 @@ "gnetId": 737, "graphTooltip": 0, "id": 1, - "iteration": 1560946394013, + "iteration": 1561480050178, "links": [], "panels": [ { @@ -55,7 +55,11 @@ "message": "Pod count decreased", "name": "Pod count alert", "noDataState": "alerting", - "notifications": [] + "notifications": [ + { + "uid": "XPFCa97Zk" + } + ] }, "aliasColors": {}, "bars": false, @@ -249,7 +253,7 @@ { "evaluator": { "params": [ - 520000000 + 533333333 ], "type": "gt" }, @@ -280,6 +284,9 @@ "notifications": [ { "uid": "ec4m9OnWz" + }, + { + "uid": "XPFCa97Zk" } ] }, @@ -332,7 +339,7 @@ "fill": true, "line": true, "op": "gt", - "value": 520000000 + "value": 533333333 } ], "timeFrom": null, @@ -1806,7 +1813,7 @@ ] }, "time": { - "from": "now-15m", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -1837,5 +1844,5 @@ "timezone": "browser", "title": "Kubernetes Pod Resources", "uid": "VW1dXd7Zk", - "version": 3 + "version": 8 } \ No newline at end of file From dad6430b0ac6c925237dfc52c247f1a53382c8f9 Mon Sep 17 00:00:00 2001 From: anuudb Date: Wed, 26 Jun 2019 14:31:24 +0530 Subject: [PATCH 3/6] Elastic sent mail count --- copper-hub/ELK-hub/logstash-deployment.yaml | 18 +-- .../dashboards/elasticSearch_dashboard.json | 119 +++++++++++++++++- 2 files changed, 122 insertions(+), 15 deletions(-) diff --git a/copper-hub/ELK-hub/logstash-deployment.yaml b/copper-hub/ELK-hub/logstash-deployment.yaml index a932656e..94c48dc9 100644 --- a/copper-hub/ELK-hub/logstash-deployment.yaml +++ b/copper-hub/ELK-hub/logstash-deployment.yaml @@ -41,15 +41,15 @@ data: # } # } #} - - filter { - # if "Host not found" not in [message]{ - # drop{ } - # } - if ([message] !~ "Host not found") { - drop { } - } - } + # Filter for accept only the outbound alert + # filter { + # # if "Host not found" not in [message]{ + # # drop{ } + # # } + # if ([message] !~ "Host not found") { + # drop { } + # } + # } #filter { # if [type] == "log" { diff --git a/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json index 323b9b8a..1225a4f5 100644 --- a/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json +++ b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json @@ -18,6 +18,113 @@ "id": 2, "links": [], "panels": [ + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Elasticsearch", + "fill": 1, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pluginVersion": "6.3.0-pre", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "3", + "meta": {}, + "settings": {}, + "type": "count" + } + ], + "query": "message:\"*status=sent*\" AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Sent mails", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "alert": { "alertRuleTags": {}, @@ -25,7 +132,7 @@ { "evaluator": { "params": [ - 3 + 1 ], "type": "gt" }, @@ -63,9 +170,9 @@ "fill": 1, "gridPos": { "h": 9, - "w": 12, + "w": 24, "x": 0, - "y": 0 + "y": 8 }, "id": 2, "legend": { @@ -122,7 +229,7 @@ "fill": true, "line": true, "op": "gt", - "value": 3 + "value": 1 } ], "timeFrom": null, @@ -174,7 +281,7 @@ "list": [] }, "time": { - "from": "now-15m", + "from": "now-6h", "to": "now" }, "timepicker": { @@ -205,5 +312,5 @@ "timezone": "", "title": "Elastic", "uid": "FV4Wjv4Wz", - "version": 15 + "version": 18 } \ No newline at end of file From 340eb4d386b16ddd1d71072987811be3eb830e75 Mon Sep 17 00:00:00 2001 From: anuudb Date: Fri, 28 Jun 2019 11:46:14 +0530 Subject: [PATCH 4/6] elastic --- copper-hub/ELK-hub/logstash-deployment.yaml | 7 +- .../dashboards/elasticSearch_dashboard.json | 222 +++++++++++++++++- 2 files changed, 220 insertions(+), 9 deletions(-) diff --git a/copper-hub/ELK-hub/logstash-deployment.yaml b/copper-hub/ELK-hub/logstash-deployment.yaml index 94c48dc9..aaccf3e9 100644 --- a/copper-hub/ELK-hub/logstash-deployment.yaml +++ b/copper-hub/ELK-hub/logstash-deployment.yaml @@ -42,14 +42,17 @@ data: # } #} # Filter for accept only the outbound alert - # filter { + filter { # # if "Host not found" not in [message]{ # # drop{ } # # } # if ([message] !~ "Host not found") { # drop { } # } - # } + if ([host.name] == "*filebeat*"){ + drop { } + } + } #filter { # if [type] == "log" { diff --git a/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json index 1225a4f5..daf6fbaf 100644 --- a/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json +++ b/copper-hub/proemtheus_grafana/grafana-image/dashboards/elasticSearch_dashboard.json @@ -28,7 +28,7 @@ "fill": 1, "gridPos": { "h": 8, - "w": 12, + "w": 21, "x": 0, "y": 0 }, @@ -88,7 +88,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Sent mails", + "title": "Received mails", "tooltip": { "shared": true, "sort": 0, @@ -125,6 +125,111 @@ "alignLevel": null } }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Elasticsearch", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 21, + "y": 0 + }, + "id": 6, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "dashboard.hits", + "id": "1", + "meta": {}, + "settings": {}, + "type": "count" + } + ], + "query": "message:\"*status=sent*\" AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Received mail count", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, { "alert": { "alertRuleTags": {}, @@ -170,7 +275,7 @@ "fill": 1, "gridPos": { "h": 9, - "w": 24, + "w": 21, "x": 0, "y": 8 }, @@ -218,7 +323,7 @@ "type": "count" } ], - "query": "message:*Host not found* AND beat.hostname:email", + "query": "message:*Host or domain name not found* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", "refId": "A", "timeField": "@timestamp" } @@ -235,7 +340,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Unbound mails", + "title": "Bounced mails", "tooltip": { "shared": true, "sort": 0, @@ -271,6 +376,109 @@ "align": false, "alignLevel": null } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Elasticsearch", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 21, + "y": 8 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*Host or domain name not found* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Bounced mail count", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" } ], "refresh": "5s", @@ -281,7 +489,7 @@ "list": [] }, "time": { - "from": "now-6h", + "from": "now-30m", "to": "now" }, "timepicker": { @@ -312,5 +520,5 @@ "timezone": "", "title": "Elastic", "uid": "FV4Wjv4Wz", - "version": 18 + "version": 25 } \ No newline at end of file From 8a5e5289c625fde3346d086c22163fcd7733c652 Mon Sep 17 00:00:00 2001 From: anuudb Date: Mon, 15 Jul 2019 11:45:27 +0530 Subject: [PATCH 5/6] Alert with elk stack --- copper-hub/README.md | 55 +- .../elasticSearch_dashboard.json | 524 +++++ .../grafana_dashboards/k8s_dashboard.json | 1848 +++++++++++++++++ 3 files changed, 2426 insertions(+), 1 deletion(-) create mode 100644 copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json create mode 100644 copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/k8s_dashboard.json diff --git a/copper-hub/README.md b/copper-hub/README.md index fb2c16d5..8806c9c1 100644 --- a/copper-hub/README.md +++ b/copper-hub/README.md @@ -1 +1,54 @@ -Copper-hub development goes here +# Copper-hub + +This repository contains source code for copper-hub which is the alerting, monitoring and update handling system for Copper. + +First, create grafana docker image using ./grafana-image/Dockerfile. (Read the ./grafana-image/README.md before building image) +``` +docker build -t graf . +``` + +## Quick start + +To quickly start all the things just do this: + +``` +kubectl apply --filename ./prometheus-master/manifests-all.yaml + +kubectl apply --filename ./prometheus-master/grafana.yaml +``` + +This will create the namespaces `monitoring` and `grafana` and will bring up all components there. + +Use port 3000 to access grafana. + +To shut down all components again you can just delete that namespace: + +``` +kubectl delete namespace monitoring + +kubectl delete namespace grafana +``` + +After installing, it is must to create a datasource in grafana as "prometheus" and local URL would be "http://prometheus.monitoring.svc.cluster.local:9090/". + +- Configure [Prometheus](https://grafana.net/plugins/prometheus) data source for Grafana.
+`Grafana UI / Data Sources / Add data source` + - `Name`: `prometheus` + - `Type`: `Prometheus` + - `Url`: `http://prometheus.monitoring.svc.cluster.local:9090/` + - `Add` + +Import the grafana dashboard from "./prometheus-master/grafana_dashboards/dashboard_1.json" to grafana.
+- Import grafana dashboard.
+`Dashboards / Manage / import` + - `Name`: `Kubernetes Pod Resources` + - `Location`: `/prometheus-master/grafana_dashboards/dashboard_1.json` + - `import` + +Then create a "Notification channel" to make sure that alert mails will receive for the right address.
+- Create Notification channel.
+`Alerting / Notification channels / New channel` + - `Name`: `Email` + - `Type`: `Email` + - `Email addresses`: `Your email address` + - `import` \ No newline at end of file diff --git a/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json new file mode 100644 index 00000000..daf6fbaf --- /dev/null +++ b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json @@ -0,0 +1,524 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 2, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Elasticsearch", + "fill": 1, + "gridPos": { + "h": 8, + "w": 21, + "x": 0, + "y": 0 + }, + "id": 4, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pluginVersion": "6.3.0-pre", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "3", + "meta": {}, + "settings": {}, + "type": "count" + } + ], + "query": "message:\"*status=sent*\" AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Received mails", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Elasticsearch", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 21, + "y": 0 + }, + "id": 6, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "dashboard.hits", + "id": "1", + "meta": {}, + "settings": {}, + "type": "count" + } + ], + "query": "message:\"*status=sent*\" AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Received mail count", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "1m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "sum" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "30s", + "handler": 1, + "message": "Unbound mail(s) detected", + "name": "Unbound mails alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Elasticsearch", + "fill": 1, + "gridPos": { + "h": 9, + "w": 21, + "x": 0, + "y": 8 + }, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*Host or domain name not found* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 1 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Bounced mails", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Elasticsearch", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 21, + "y": 8 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*Host or domain name not found* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Bounced mail count", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "refresh": "5s", + "schemaVersion": 18, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "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": "", + "title": "Elastic", + "uid": "FV4Wjv4Wz", + "version": 25 +} \ No newline at end of file diff --git a/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/k8s_dashboard.json b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/k8s_dashboard.json new file mode 100644 index 00000000..e23028f1 --- /dev/null +++ b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/k8s_dashboard.json @@ -0,0 +1,1848 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Shows resource usage of Kubernetes pods.", + "editable": true, + "gnetId": 737, + "graphTooltip": 0, + "id": 1, + "iteration": 1561480050178, + "links": [], + "panels": [ + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 8 + ], + "type": "lt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10s", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "1m", + "handler": 1, + "message": "Pod count decreased", + "name": "Pod count alert", + "noDataState": "alerting", + "notifications": [ + { + "uid": "XPFCa97Zk" + } + ] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "description": "Pod count regarding to copper namespace", + "fill": 1, + "gridPos": { + "h": 7, + "w": 16, + "x": 0, + "y": 0 + }, + "id": 42, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 2, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "count(kube_pod_info{namespace=\"copper\"}) by (namespace)", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 8 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Pod count", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "height": "180px", + "id": 7, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_fs_usage_bytes{id=\"/\",instance=~\"^$instance$\"}) / sum(container_fs_limit_bytes{id=\"/\",instance=~\"^$instance$\"}) * 100", + "format": "time_series", + "interval": "10s", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 10 + } + ], + "thresholds": "65, 90", + "timeFrom": "1m", + "timeShift": null, + "title": "Filesystem Usage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 533333333 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10s", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "1m", + "handler": 1, + "message": "Node memory active alert", + "name": "Node memory active alert", + "noDataState": "alerting", + "notifications": [ + { + "uid": "ec4m9OnWz" + }, + { + "uid": "XPFCa97Zk" + } + ] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fill": 1, + "gridPos": { + "h": 7, + "w": 16, + "x": 0, + "y": 7 + }, + "id": 40, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(node_memory_Active_file)", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 533333333 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Node memory active", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "datasource": "prometheus", + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 7 + }, + "id": 6, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "max": 100, + "min": 0 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "red", + "index": 1, + "value": 80 + } + ], + "values": false + }, + "orientation": "auto" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "expr": "sum(rate(container_cpu_usage_seconds_total{id=\"/\",instance=~\"^$instance$\"}[1m])) / sum (machine_cpu_cores{instance=~\"^$instance$\"}) * 100", + "format": "time_series", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "timeFrom": "1m", + "timeShift": null, + "title": "Cpu Usage", + "type": "bargauge" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 20 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "10s", + "now" + ] + }, + "reducer": { + "params": [], + "type": "sum" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "1m", + "handler": 1, + "message": "Service count is not enough", + "name": "Service count alert", + "noDataState": "alerting", + "notifications": [ + { + "uid": "ec4m9OnWz" + } + ] + }, + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fill": 1, + "gridPos": { + "h": 8, + "w": 16, + "x": 0, + "y": 14 + }, + "id": 38, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": {}, + "percentage": false, + "pluginVersion": "6.3.0-pre", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "count(kube_service_info)", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Service count", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 15 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 10, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum (machine_memory_bytes{instance=~\"^$instance$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "title": "Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 35, + "panels": [], + "title": "all pods", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 23 + }, + "height": "180px", + "id": 4, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum (container_memory_working_set_bytes{id=\"/\",instance=~\"^$instance$\"}) / sum (machine_memory_bytes{instance=~\"^$instance$\"}) * 100", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 2 + } + ], + "thresholds": "65, 90", + "timeFrom": "1m", + "timeShift": null, + "title": "Memory Working Set", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 23 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 11, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": " cores", + "postfixFontSize": "30%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",instance=~\"^$instance$\"}[1m]))", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "timeShift": null, + "title": "Used", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 23 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 13, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_fs_usage_bytes{id=\"/\",instance=~\"^$instance$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "title": "Used", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 23 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 9, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "20%", + "prefix": "", + "prefixFontSize": "20%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(container_memory_working_set_bytes{id=\"/\",instance=~\"^$instance$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "title": "Used", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 26 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 12, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": " cores", + "postfixFontSize": "30%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum (machine_cpu_cores{instance=~\"^$instance$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "title": "Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 26 + }, + "height": "1px", + "hideTimeOverride": true, + "id": 14, + "interval": null, + "isNew": true, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum (container_fs_limit_bytes{id=\"/\",instance=~\"^$instance$\"})", + "interval": "10s", + "intervalFactor": 1, + "refId": "A", + "step": 10 + } + ], + "thresholds": "", + "timeFrom": "1m", + "title": "Total", + "type": "singlestat", + "valueFontSize": "50%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "fill": 1, + "grid": {}, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 29 + }, + "height": "200px", + "id": 32, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": {}, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_network_receive_bytes_total{instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m]))", + "interval": "", + "intervalFactor": 2, + "legendFormat": "receive", + "metric": "network", + "refId": "A", + "step": 240 + }, + { + "expr": "- sum(rate(container_network_transmit_bytes_total{instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m]))", + "interval": "", + "intervalFactor": 2, + "legendFormat": "transmit", + "metric": "network", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": "transmit / receive", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 36, + "panels": [], + "title": "each pod", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "decimals": 3, + "editable": true, + "error": false, + "fill": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 35 + }, + "height": "", + "id": 17, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": {}, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"copper\"}[1m])) by (pod_name)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ pod_name }}", + "metric": "container_cpu", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cpu Usage", + "tooltip": { + "msResolution": true, + "shared": false, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": "cores", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "fill": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 33, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum (container_memory_working_set_bytes{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}) by (pod_name)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ pod_name }}", + "metric": "", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Working Set", + "tooltip": { + "msResolution": false, + "shared": false, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "used", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "fill": 1, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 49 + }, + "id": 16, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m])) by (pod_name)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ pod_name }} < in", + "metric": "network", + "refId": "A", + "step": 240 + }, + { + "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}[1m])) by (pod_name)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ pod_name }} > out", + "metric": "network", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network", + "tooltip": { + "msResolution": false, + "shared": false, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": "transmit / receive", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "decimals": 2, + "editable": true, + "error": false, + "fill": 1, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 56 + }, + "id": 34, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 200, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_fs_usage_bytes{image!=\"\",name=~\"^k8s_.*\",instance=~\"^$instance$\",namespace=~\"^$namespace$\"}) by (pod_name)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ pod_name }}", + "metric": "network", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Filesystem", + "tooltip": { + "msResolution": false, + "shared": false, + "sort": 2, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": "used", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 18, + "style": "dark", + "tags": [ + "kubernetes" + ], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "prometheus", + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [], + "query": "label_values(instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "copper", + "value": [ + "copper" + ] + }, + "datasource": "prometheus", + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "namespace", + "options": [], + "query": "label_values(namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "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": "browser", + "title": "Kubernetes Pod Resources", + "uid": "VW1dXd7Zk", + "version": 8 +} \ No newline at end of file From 7474c2634f024f5e6171ec9e0669d83be02c8fef Mon Sep 17 00:00:00 2001 From: anuudb Date: Thu, 25 Jul 2019 11:06:23 +0530 Subject: [PATCH 6/6] Spam counter in hub activated --- .../elasticSearch_dashboard.json | 253 +++++++++++++++++- 1 file changed, 251 insertions(+), 2 deletions(-) diff --git a/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json index daf6fbaf..92dbcecf 100644 --- a/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json +++ b/copper-hub/proemtheus_grafana/prometheus-master/grafana_dashboards/elasticSearch_dashboard.json @@ -479,6 +479,255 @@ } ], "valueName": "total" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 20 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Spam counter alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Elasticsearch", + "fill": 1, + "gridPos": { + "h": 8, + "w": 21, + "x": 0, + "y": 17 + }, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": {}, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*spam* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Spam counter", + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Elasticsearch", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 21, + "y": 17 + }, + "id": 12, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "bucketAggs": [ + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "auto", + "min_doc_count": 0, + "trimEdges": 0 + }, + "type": "date_histogram" + } + ], + "metrics": [ + { + "field": "select field", + "id": "1", + "type": "count" + } + ], + "query": "message:*spam* AND host.name:email AND log.file.path:\"/var/log/mail.log\"", + "refId": "A", + "timeField": "@timestamp" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Panel Title", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" } ], "refresh": "5s", @@ -489,7 +738,7 @@ "list": [] }, "time": { - "from": "now-30m", + "from": "now-6h", "to": "now" }, "timepicker": { @@ -520,5 +769,5 @@ "timezone": "", "title": "Elastic", "uid": "FV4Wjv4Wz", - "version": 25 + "version": 29 } \ No newline at end of file