{"_id":"happner-elastic-proxy","_rev":"68-08698b8786d946888593795ee3f416d3","name":"happner-elastic-proxy","dist-tags":{"TR4243":"5.1.0-TR4243-3","SMC-787":"6.0.0-smc.787","prerelease-6.0.0":"6.0.0-prerelase.0","prerelease-7.0.0":"7.0.0-prerelase.0","prerelease7.0.0.1":"7.0.0-prerelease.1","refactor-configuration":"7.0.0-prerelease.2","smc606":"7.0.1-smc606-1","smc1878":"7.0.3-prerelease-2","feature-SMC-4647-esindex-lookup":"8.0.0-beta.1","latest":"8.0.0"},"versions":{"2.0.0":{"name":"happner-elastic-proxy","version":"2.0.0","_id":"happner-elastic-proxy@2.0.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"f2b29e9564afaca64336da18049e6750365769b4","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-2.0.0.tgz","integrity":"sha512-r+5p7S/3gb07Bkip4tS67jtnZ7Mvuf0oEVJ1VSjnY1O99h/TtZq38f7LM+xZILx5zFv51ht1egM6GOEPP2Gw0w==","signatures":[{"sig":"MEUCIQDESmlwP5/FpuJTOM+1d1SVX4o9pdZ47XPtpQvvOuZqQQIgRuqU9mmcovrlboQiwxSIXzBol5mQVmJz1w4PtcHG/m4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","gitHead":"396ea5c9186eeff51fa388c369787e1a1f72ecce","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"5.4.2","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"6.11.1","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","happn-3":"3.0.0","co-median":"1.1.5","happner-2":"6.0.0-alpha.1","lru-cache":"4.1.1","wild-pare":"4.2.0","wild-proxy":"3.1.0","happn-logger":"0.0.1","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","happn-util-crypto":"0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"1.2.0","happner-elastic-dataprovider":"2.1.0"},"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy-2.0.0.tgz_1510170648462_0.41764891636557877","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"happner-elastic-proxy","version":"4.0.0","_id":"happner-elastic-proxy@4.0.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"ed0964049277ef6bf72d99087ac987e7d1f787e6","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-4.0.0.tgz","fileCount":29,"integrity":"sha512-lyt4UzRwFnAoV1i/MPOxgxGft9KkID8qZTgplkNscl/WfgLuSPgse2z0XdvzHCH2Q+voFem8/OD2Xe5PC9bpPw==","signatures":[{"sig":"MEYCIQDqgCXrFasiSKqT9pXGqtOOLpqE+iAf8NApHgvzHojwaQIhAPOQvMi0TamMcugoj9UGdjweyKJ5zLI0I6cIpF03FCpx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93951},"main":"lib/index.js","gitHead":"6a0d2fe8f61c417da26501578a1d29f248541e03","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"5.4.2","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"6.11.1","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","happn-3":"5.3.0","co-median":"1.1.5","happner-2":"6.2.0","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.0","happn-logger":"0.0.1","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","happn-util-crypto":"0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"1.2.0","happner-elastic-dataprovider":"3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_4.0.0_1521015042381_0.3246050465977195","host":"s3://npm-registry-packages"}},"4.2.1":{"name":"happner-elastic-proxy","version":"4.2.1","_id":"happner-elastic-proxy@4.2.1","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"20bb90f62d32a17327a876bf52e33863572023e7","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-4.2.1.tgz","fileCount":30,"integrity":"sha512-NUgoWeSJ9pWppGLt+w/lKm5D34spyQuB4VsVpsr92KeFyNeDUz71ZGzKyKjGHkiWmGxpMfrVo67MqbmNnt4ncg==","signatures":[{"sig":"MEQCIGh7d3heIvpikxIxdYFi8DWJ4yWy+3H5pEGXIx6tLFBbAiBbD0n9NTZil1k6DfIVhOe2N9YOIX5JzmC6YH0SPf0xzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":92419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4Dp5CRA9TVsSAnZWagAABRcP/iaEn8Uz5qabcweAmy9N\n3IOEcu+uiI49tSItBIseq4u3QH2yUbIL92e992xUq7dO8pDGmz4NLogcJYFi\nbg7mNSIS6SjUuBqKyK1xXrgT0QTwH6BoMAbz+VTjIvV9u1DCqFGOSdC/1CUU\nWbDKTa5ScXa8GJP1nn0e6kXzsmijwByC8Yx+vrwICrqFQXiSxSw46vpf7qVA\nRFkAFt8RXINYH0iZPZqTFQWfDl+qzNT4mUuElYOCzGhWYubzXFop2kdUsefe\nw/7+Ap5Es8cohMEiD9linsjLZyerJK1RWcKGwBeJk4opAxsjKIsgqvm/LRi8\nBZouFKA30R0EY2mrS0OIGbphsVUkrsz5hFxGVuBYFlD8JrAgVoYam2eYl+4P\nn/zHqWNcfFCpFcgCzHiwkVtQVFJ4PsG7mBzMZEkIMYomNIhUlcjX+YCkj/xn\nigqC6yooMyJX0ScbIb9I6CK635a88BH45iVXoE5ZXwPgFSiA2vvLB67wQHiz\n3Q0100yqQ4hmg2KNOBz5XtYu1WqxSMnpzzG9KWSpnJO8Vb9m4rYLyITJ2Oie\nUSQmalhhvi4ysCrPACR6FJT9Hsd2BscHgD9AEKicd5F0OEJmi6L7mZcBF1dc\nInV6ZMS9NcEbdT+1vyjaYV1y827Mz6ixqflkacN3sSXdyCDTioyhdqswpjNI\nqpyG\r\n=9kFv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"f382b211bafa195034a7d2bde550769e042a3572","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"5.4.2","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"8.2.1","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^7.0.0","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.2","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^5.0.0","redis-lru-cache":"0.1.0","happn-util-crypto":"0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"2.0.0","happner-elastic-dataprovider":"3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_4.2.1_1524644472273_0.22125416242438134","host":"s3://npm-registry-packages"}},"5.1.0-TR4243-0":{"name":"happner-elastic-proxy","version":"5.1.0-TR4243-0","_id":"happner-elastic-proxy@5.1.0-TR4243-0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"9e1c1f430797feead7b76e4cc84b6bce3d983008","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-5.1.0-TR4243-0.tgz","fileCount":28,"integrity":"sha512-XbojFps6EzSTvssHti/LnpQ9jPeSr0B8kNog62iMG5HF9jeWPiCC4+5eI2W7ol7h/2i9PVfoH1GEPxgb25CqiA==","signatures":[{"sig":"MEYCIQD072/bmn3cJD7JTgQDFjzuhOb1q8cGuF+cgbEpClgkAAIhAMO4wYA9kYtZPS5QhrhkjAkBjgEQQfWWxYALBt+oVxOC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":77575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW+z9CRA9TVsSAnZWagAA5yoP/RMjK5yXDT2AKvXNLPcr\nBTXCjB/nA7VGKOzsi22kKshLk1XuXeEXVTwHTwYynKQkEHbWjK3V5lgCXG8s\nVpO6DjMTCkMzDzrNcSY64I4SAnnuaK0j6Ikr6Se8bk2hqAwrd7dU0iCNtOHg\nBcR4pWKVe/+RHnPDB31RwKPbl2Qp9OcJlWomQgxXg34b9PZdJxp0wlAFozan\njuhzf3g+secaIH5rHoB/yzhC531PfiPjDQuvRuQylEn3Z4oISZtXQL2tpv4C\nRC9WYF8eqxgeMXg2m8Pj9o3DxJ8KLK0AjGQceRRG64xxz3MsNywszRkNI1le\nSRq3vSXhUUJZWIJhu1bb2aN7sKtL+3UL/b7BiTX83gqyKIea4aMf76lDBCy5\n9vbzv77oQ3jdp29nmHu6lMxeqlB2JhbSMSWs9UNxQ8I5GVtiUxliA9zk2DCD\n67U9dWn2Ri4fzC9efcolqzRJhrat5/+Z3NlReuIpSbDyJs8qTW9Cb7P265HI\nTQOODceEiZPgxonLad7mkjk0dK4MI/iAYA9fKB7eB5waJLXj1QINfKqBwAu5\nDl2rEhfP8ejy021dgws7I53IADl2rG9IIbMyxB8NqcRisEUh+1kXlTvtqXDa\nOdnO1qyiUVIgi0ZTR7owqofdGQhKcQlGRPmWqvzsEozfs5PObJk1+iikIPil\nfYJB\r\n=Lt1G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"8897028736f2a3772b4803089085c73fb7ff511b","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.7.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"11.15.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^10.2.3","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.2","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^8.2.1","redis-lru-cache":"0.1.0","happn-util-crypto":"^0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"^2.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_5.1.0-TR4243-0_1566305533187_0.7451223693089892","host":"s3://npm-registry-packages"}},"5.1.0-TR4243-1":{"name":"happner-elastic-proxy","version":"5.1.0-TR4243-1","_id":"happner-elastic-proxy@5.1.0-TR4243-1","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"0b59c4a4653c6873e8b2166d26426111a00adb78","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-5.1.0-TR4243-1.tgz","fileCount":29,"integrity":"sha512-BCOOhFdF63GO1zDT3KH257cS/RwhCzYm5/gIVeVJhi4ATEsRRCpGGx+eUF6ZK07k/Xhi/ryc5z6TeiSWJvrByw==","signatures":[{"sig":"MEUCIGn/ubL3HMKyeyl4Z51oa/oyXOPnDqdBLf1nCF/o6kWXAiEAwSW5vvJT5/W99+MH9ko9XPhMqZvjKBtqLSpedcqfaFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdX7iWCRA9TVsSAnZWagAAlJMP/RTPEyjJklLvswkoYT3e\nFGkOYih6vOG7YlA8XkDWH/V0E/RWjCCQf2sPeot8r6YpM/1MSNB9EQh3t/6n\ndX3RScuV1dX5OqPNTxjgvt3svLc7N40aIGpGDtuS3Gzhenj6Ph8EL1AfJB4D\n85GrzQckobEy8rJW7JtAAcf/MklBUAAsNMVLplr3+2P7vxL113IudsRlE83i\nYINjPIDGERyTLcSkJVJVaZ/ngIJx0GFraH7Nox3wd6EuoN2edPjuywEWAB/D\nyCSELUvnXO4MQUr4LS4z5GkxJNYOyYZwK+1BvwQ86nCzvd1NF8YAyirn4dAn\n+2zt+zMbYkrbTD1F9SKJ1E/34toDFGqgzbPrpYlaNE+FfU/c8Y7OrAZDfTf7\nQN65kbnfPHWeXxHh1M3DPus+SnCEz7RuiuMB6otVX/xeHcoFl9Wpm4diD+rd\nOAHl0rEQLwzdyLxAE9jcxDWf34XIBItuhz0CcS4/CaOS1XBJxtPfv/dbKoJ1\nHcGy2IK/MgI0Aa2PuFBJ8eC64/dc0LIzlgEWn4YLLNrrNh2t9YUqR+AJpG7Y\nC+VzmbYKnzMxxdk3HS7DWHFzsCI1S+evnCNHiG1TlrMw4QGYkNFUoW3idJC5\nkgSOkIrirHKMtX7QkffCgnN0LEEIYmp66t9lDuDx18Gy+/xgocv9aWpLZb7A\n30aa\r\n=xnAs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"3bb9748fb2f668dc8a51f6d7a0e4c8247003e38e","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.7.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"11.15.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^10.2.3","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.2","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^8.2.1","redis-lru-cache":"0.1.0","happn-util-crypto":"^0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"^2.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_5.1.0-TR4243-1_1566554261659_0.12106465319414106","host":"s3://npm-registry-packages"}},"5.1.0-TR4243-2":{"name":"happner-elastic-proxy","version":"5.1.0-TR4243-2","_id":"happner-elastic-proxy@5.1.0-TR4243-2","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"f2fae3a2ef9bdfd2e968d0da5f87509e7c2fc412","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-5.1.0-TR4243-2.tgz","fileCount":36,"integrity":"sha512-vnMZmC5/Y8BuCHOP8NhLB0xEuWqCx6H0bukwfTwaw1sZ3+LT7u64HQ83QibF3PFTfRpYfuYOa1r4C9dmITC+xw==","signatures":[{"sig":"MEYCIQDdq0GzcnQvDV9h8904sLQHl2IsAQDwbgP/wLwVqBzpqgIhALeljmAHyz7d3HR222GMyln+e6eWWq5bWq80+1WdMfBZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcO4KCRA9TVsSAnZWagAA9s0P/id1GDycSQ4UdllBDVha\nuEG0GWUtZ5dzo6W/0YbMCv+A5b5rzd88tfe2H1rgJ51YzZyefUnstxWDCRdy\n1uqgaltzARUsAGXnygIaAk+xLC/hksZPgtzaCz3yHtDZfsMBvrc0JOI+7K6J\na0usfxug+Cu6dW8px1gshzEP4v+jmYOMp+T4XqpxA+35ebtuFyCLKs9GcNs+\npvJBqqvuHx4FYmuRgVuoDuKMPoZCUu89ntsdmmXDAj2MPVjf1rz5mjFVipxf\nBi0zJGFxosZG45R+gH2u1zfEUEJTu0NrukQPIS0OnRXblxXHD0W36GWIl2r7\nVu6a+tX47gVf+K59uqWFsIQvs6MuiuwG5rjGTaTa7eAYH18idTAdsiAltIup\ndB5/aaWmuXVxyKD6ScsH6TURzBlZzjuv7PcASFG8R/b7be1R7V+cFqLv0WvX\nU0+9G32oHS5AjmKSWp16RZXAk6MmGhJSZK5YoAd7/ejMFCFwrGWFtZ4oIdnC\nK99JW0DXajQBxcQ1jut9MSgF7nkuN7a8oMGZei6R1jWnZw5iGHZLECmT5tw8\nT+YN9M+CSRzEyIpAVcyGZp56hnFGKIlruVpObdgCbGYZGA/D/H/A0ZviBMdX\nZkEw2nLT6UWp2SMUNZ0ZC+lpwAbWy/6pk9BOTi+YzIwsw0lxM4hqtIjI0fcd\nYQT9\r\n=vGQz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"0225291cd802b5a1960653187907d546bc99b167","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.7.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"11.15.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^10.2.3","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.2","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^8.2.1","redis-lru-cache":"0.1.0","happn-util-crypto":"^0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"^2.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_5.1.0-TR4243-2_1567682057753_0.06086697464754187","host":"s3://npm-registry-packages"}},"5.1.0-TR4243-3":{"name":"happner-elastic-proxy","version":"5.1.0-TR4243-3","_id":"happner-elastic-proxy@5.1.0-TR4243-3","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"201e8b2589fa31cd4e59bc3f0af455203a38a9ab","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-5.1.0-TR4243-3.tgz","fileCount":36,"integrity":"sha512-WWy3oiGgsO8zDxhupcJnL+az1ml/yZjbgcYJdrmTNE+gWpV354SW1zZgb/hUp+ygv6BUexNit5rVazQ4+eqnUA==","signatures":[{"sig":"MEUCIAUrHdfQWgV6wPQjplufTwmzB0llizPuODQmht6Eu003AiEAzlf/1OLnQDo3tDFHnlS7RkPfiGrG2WlAyk1M18q5EC8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdd1HyCRA9TVsSAnZWagAAz1wP/ihDtbSF/QYeacIrxGeI\nr+ArX/exDNp+TlPyDWVU8baivT3wbJ8RNIDXtX3uL4cRFbTy8H4+ndftEARM\nLRJhiJgNfBHov3SMXn6b+UDB3K46Y0UAJxCZMtfI8laki/Y90F7a+Sjcxdpt\nbC+xGonMXqR4ZNgAHv1GZf9SB95jP+PHjnczaZj4a4TAXpkP87Y9JAvFe67l\nntSf4BN9CU4hpQ8iw22Iakc/csNZ/ulXUkDvgbUP/fikmEAtjr84BpVBfmeO\nkXKVT1iGl1agcrfD/4j/16a07z5rljkLdkLLWGatbBp2WAfzmgQzfDDc+W3+\nEuR/xQC99FJ40f8efmxoY7clUfYJD7YMUQ1W/c9bWjf4a8OX8t9se10mrus3\nzOV2pR0D+IwqBBe4aDbr6A2OirAEx6Z0/3DYvf9egRq8sEr0kRNGJZ+LkBg0\nKeoGjH6gyKeEkLJqb9jU52me7coMKssayXh43/DD6THoTSyGorYB3vOwITtB\nhG1MMRiL1hkDpyNmyxn8g3+SAAQA1I9giLAiLaYEAINbf2woE4AdnQ4hhVgn\nhP7BTs9XyykpQPS6pBlPoPsNSEJbUsbBmCWJAMZ2mm0u1vyaefZz2Yx1ykWC\nz9juD4nbZLQz7FeN86eJFAjD6A7QPCCJfRZYG5kiXYGQZKQgbTAstQag0xJC\nHyxw\r\n=Af67\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"1f07a4530cff2ac6f32e0a99826474f9824259bf","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.7.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"11.15.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^10.2.3","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"4.0.2","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^8.2.1","redis-lru-cache":"0.1.0","happn-util-crypto":"^0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"^2.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_5.1.0-TR4243-3_1568100849351_0.5925187944252472","host":"s3://npm-registry-packages"}},"5.1.0":{"name":"happner-elastic-proxy","version":"5.1.0","_id":"happner-elastic-proxy@5.1.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"6eeace4a89281def3584db292fd933373796dc1a","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-5.1.0.tgz","fileCount":37,"integrity":"sha512-LGwY24Hvw0y1m1jqMgEMZOgRn8Z1uAxvFpeEsan/e+f3Hn+S3mheyFH4wDPdsgi/wees59kjmw+6b9CHdtZGRQ==","signatures":[{"sig":"MEYCIQCYPM7wXr4FNxzDv4ErKnG5W37Y0XglCT40nbW2rVoynQIhAOai8Ft/PJBZgivTlQ9lcK2gSO+JhEf7dHpF2UPH+edY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":95316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg6YbCRA9TVsSAnZWagAAAlIP/0FAlZ999fYKNRPIxzuy\n6TJ2NaNH2/AMHJKWd0rzMEOmqWtdOeHiGPnwWzeg2VUiC0h/U9NtNHjmV3iI\nxlLN9U8Fn+B4peBi9fW6tkm9vjevNF/4G4eJn06jx3mAKT8KkjhHdRrsBS9U\nifS9uYhbwHLEBAPz2qNRyCfY07ajxj1G4WhKNAfGRfkHdll2iaJm0Cq6AZFM\nSBPLdfmYw11Zlti54UlCJ7M6uAsQGG0U4Ssqh2qOp18jMIQ9yJubirY0sjto\nmnBcpVQtagWo3ROh4ocJdIl8hxFO8HvTqAwvCn0DeZasndwJANyE0J7F+FUO\nWP/CgC9k2SZpYODuRc7dwF7mrw8qplFK6wzDdYIOqr6/1Pi8Z23kgNx86kRW\nOjbEhiCsiWVCY7h6JbrBqRGx+WNVgLiDuLAoz8xXW8/0TUA71WHjHtYsb+7Y\nlRdiSovWBz9X+f1zZJZUdKs85zetPaLPA3pDWcd5KGPLOO57OPp5ewUQ5Xt3\nwHmFibxh5pQAU0DquydKQlsqGpexbz5s9YO5dFgA9ZKx/5QnUvJ8Jy5t4b4f\nUFZUCrNtd50C3nv0Tp5VzZEtOzvLxTlBTjAo8Ro16blfplCysSdRuiIANRjI\nlsGKp4+jv/AymZy8oOynQYWh8g5TnqLBCvuGEeV/JJpkwWNnh8le1pGaxjs+\nImBc\r\n=jRpt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"d82b125711346a3a378077cf4440283c5a008072","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.9.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"10.16.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^10.2.3","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^8.2.1","redis-lru-cache":"0.1.0","happn-util-crypto":"^0.2.3","underscore.string":"3.3.4","happn-service-mongo-2":"^2.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_5.1.0_1568908827293_0.17194194815218","host":"s3://npm-registry-packages"}},"6.0.0":{"name":"happner-elastic-proxy","version":"6.0.0","_id":"happner-elastic-proxy@6.0.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"e05153706bfbb22ec358af40ced2bad2443ed93e","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-6.0.0.tgz","fileCount":36,"integrity":"sha512-D3pV+v9SGoV9FzsfAp13H4jIVgEBBMhgOHKPlbPaVulSAGj45tSaTqZiOsTAMMbtxPhBYCuVaKgtQT9oNP+f0Q==","signatures":[{"sig":"MEQCIANraDFNag1CNaI8NTxEUtc0WdgLDWip1il2BwIWukl8AiBiZ4RNXbRAuDUW7rVoTU1XotijBQu0lyN097MNFXTv7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIanjCRA9TVsSAnZWagAACdIQAISMlrS9g2+Z75BGzdqh\nw/kx4zJTXJ2yBReUccmLWKiwVOebfrAQ77aTr0li5koGjnrECGXRLos4BOPd\ndRd7hSDa9uj14hWMragfwgI+lBvM8JmO2FbA13QMFXqib0SrIsnnjMrqplId\nchCNep8tQWGxGqVGsbUamErtxebq9JpTbiL+ge8VS84BTIXwqgK5f16FTZ5u\nz1OhqqI9O5vW6bKq+aNFopw3K2sdihNfEeyGYHPSJwDa72ZSOfstrC317eu7\nvIySsAG3HdII04gJW2fN1SNy4J9rtewcSNXlZrvkt3mjpRui04JDouNXrTaM\ner/qEfs3MIMnfufBJ1RhmSztN/pfM64YSr+gMAQ8pB47INIEw08nTbQiQr+L\nBWG4i88b9BQ+lMN8eldbtwXPEUBPszB6RDMQa8FsKXr5nFEC6bhhg+EApEMR\nh7WKcrBSIp3EKukH0k9MYosw3FQV+SU5X/wMU0iSX+rHRvyuaCTB70nxxJi3\nzNVYMGJwgYsK3fXhv97g891Teq1aInl9h0IwixNP6lOkIa1HZ0AoWgC+o6Ye\nE1itAJqsaRPSrO2xbHJFRiiytUAjGIMHdsSX5Gm0J9Kyk+kAeJCzz27hCtch\nhjTjqYkJjXklgLacfXzuUTdPdq+yP+YwqcxjSWK3x8ov9flKw0BmT4EaMN4H\ndzHJ\r\n=JqZ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"729ec592683589bc9f158e4fa9a257e5ab29c3b9","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.13.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.14.1","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","co-median":"1.1.5","happner-2":"^11.0.2","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.0","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_6.0.0_1579264482924_0.7682971873199753","host":"s3://npm-registry-packages"}},"6.0.1":{"name":"happner-elastic-proxy","version":"6.0.1","_id":"happner-elastic-proxy@6.0.1","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"abfe8db1adffb40c023c956b6d2ee408725bd42b","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-6.0.1.tgz","fileCount":40,"integrity":"sha512-4jKH9NBOjWvIw2ZzddRm4+q5PxhAzDKj+MkDVAXXLI3EG4RIn7YHSzFpelfcEBtQyf9BQLy/FaClLtCSES5cMw==","signatures":[{"sig":"MEYCIQC6qGt0saO6k8Roq6gvTXS6eBKoQrXqK/sWwksgVAky/wIhAL44QGG0BiCNSJ69vZpdOts3wRP0oGDnePTvmU4ItfJT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2KPPCRA9TVsSAnZWagAAU/YP/3hEwgrd/qGNXpP27GoE\n3dHMklBmTSY8Lv/+6yDB9ZxaPgZLMrRYV8v/W8AZdWQLKSJIMfzquH/qZbs3\n1lE/Rs/pJFWFy1FPu0BFua+44xY/p88Qy6LnzdvYHPoxAihkHGrd5Lorosco\nCKYZrZNIw09ZV64UO41poxWUVvov/HbHpuekie8svhUM8qnbDmOjSA2jnbyC\nOM1XVbPmEpdbDV1hj98/2SdHVConeSvnzermofop77va1aDKci0HGsnq+E+3\nqk1ZCaiaGgzsbmIOB77xdR/wdQJtlAKj0BtjoDL4oj65YMIct3KgOB2+98v7\nNMed3Mt3UU/2QrE738tawBo/J53RkWlMrdu9gx0UBk1WXM3XdY0EZznaBL4s\nAoz14EB8GjxhEvBPczlDCyOPgiyYkGR2ONCtmlPdRApFbcEkx9W/M0W5ZSrf\nDeDqL6v6OxY9TsrQQTcJj7oSM0IeUkf7GqvkqsJ6kbR5BB0O/H6L2B46pVJ3\n75RrDfwZTUvTv1RKa8IyhLV0Pzo3/mqeiOY1Z7kuhDaIjmMv9DyE5zUAu4zb\nAt2Z88Fo/Xe9ENKUt7tp1i0awKUDgYwCyTLmE20fxExx6cqkne9NUwJtwluY\nO7BagsRoi41C28nyYf3V2I/y8HDOs/MUAaqk/jNjFOSN/mMuTcQyWaGdUQgl\nCLZ8\r\n=aGuO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"5c9b3505442307a15648af0cdcade8cfa1a078b1","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.5","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.14.1","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","happn-3":"^11.4.2","co-median":"1.1.5","happner-2":"^11.2.12","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.2","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_6.0.1_1591256015121_0.933340612037681","host":"s3://npm-registry-packages"}},"6.0.2":{"name":"happner-elastic-proxy","version":"6.0.2","_id":"happner-elastic-proxy@6.0.2","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"f943e7499eafa90cd70283ab72010338a9dcf32d","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-6.0.2.tgz","fileCount":47,"integrity":"sha512-8z4xnUqIUeRvUwD1EdcU+ARMXFYPPSbtJSv+h1umO1ZWrq21HYG9itDln3dkG/T3a6Tn0XhqyyQ9HIJojjxobQ==","signatures":[{"sig":"MEUCIQCcn+/ZLXVMztXzYWFR06XYj6YOlnz+AV23ekuOoQ7VHQIgd7Vdt19DH1Wzq7daymNsX5LxMTHvFgFq/Dzz0gWHQB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDqXRCRA9TVsSAnZWagAAGu4P+wQS6OhJUVL9isFXx3SN\n5W+hQX9YIqdApnZGpyiPpE1x8bezEm1agmyDW50i0xogYB3Wktqie3q7r87F\n3mZtOvWCTo3N8gTA+zoz5cO0AhCKodymm5ZKqGVan0ILAYwIhG5tT/9q7gLI\n6CZTcud9qOpsjaL9QzGqRAP13tuNe3zWF95w2VbrTsJonoMC2zEzImMceR0l\nAxlyCFkrlFkQpjZLuGw3HFdpMpLLcVSUXpbPfmE4A9W4ESqXNkUx6dt13nwp\neRQ618TbGN+pGP/hIReHKpBPPoNTPIZi+RdHpXeoHoh/uArW35QwLGZSLdW7\nfnee6v5RiGt4RNMUvJzWn99PNCGkb5qJKTktDu5WGcJfDgSoy0n5F0Wz866r\nfciixIksJl+ASFOy4vO3efe8vOgFkUvrS274fbqOT+YIpR1FiDKkeMcehwc4\npEVv8IVHnag/5FOiOkg41nL+bIbC1YSe6h5kbDQh6cLsiTKMHVgU+ru0NRSN\nas7NqPezEJInDyO7k9xFt2M5G2KGznBNxhnsJ0NCw51WYqhjpjhaxBPuVTFx\nKjd4e+hQnGwAQJZesbFqN25CTj+FHrFSshR8d+PIWMX0RYM6ETcP5FQhNIHf\nYO2EGRXvuBFDF8vbDpFeGGxZ6daMD8aXRJ03spIvSw7jB1jNT7eYKWqHgrfW\nIyk1\r\n=YigB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"8397786f7697827f902f29ae0619c4f830625a18","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},"_npmVersion":"6.9.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.6.0","dependencies":{"uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.5","happn-3":"^11.5.3","co-median":"1.1.5","happner-2":"^11.2.16","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.5","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_6.0.2_1594795473474_0.7843460468961034","host":"s3://npm-registry-packages"}},"6.0.0-smc.787":{"name":"happner-elastic-proxy","version":"6.0.0-smc.787","_id":"happner-elastic-proxy@6.0.0-smc.787","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"3fbb9d206a4a8093ba87058a2a4498c99fe066e5","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-6.0.0-smc.787.tgz","fileCount":52,"integrity":"sha512-yd6m7PBjpL4O67mbI3rpGPfxViZSt8QBRb0GaTePT/owg2hABuTxsL9ikzXR7p38jnivmWzI8rKxCECgP7r6EQ==","signatures":[{"sig":"MEQCIE62+mROnzemBWPmWrnny8OwAwYxJdslY6FDktA5UsVrAiAZvboLaTencVt4NqY0q5TYExVsM1ZSIKgnLVimJNKxdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPjxYCRA9TVsSAnZWagAAY2sP/jGCflzk7fXs2OJpHEBQ\n3jrkvjGTviGjOt1wub0zlN59lFELao7oSbzyjXABnVKRT8cwz0dpAeHgOli6\n/uvaFR6yEUIIz4hyz3WJF/X2DhZ7IbPiI+Nyte0r1QawlyP3REUABRGJ/Av0\nxuiZO1LhsxJDucukzVlBOeMglAKAM8RGRYoybBhxz5nBDngwFTK0gCfRPz2O\nIcS5E8ZnGoKfde8Fv2Ii2STEelY2yWzxGqGY/2jwyLEpbDqd9iHf/wgH2goQ\nI2zOFS7GjjYgSTMrw9F/Gdngo3Da8jG090EAw3hOd4CrEYUI/x+g3uSvuDLr\nldHqe4oLhODWSMFRPMgWA1pDi/oGJeiveTzmOm38wcv8qgeYS5ymNj7D2Zht\nDPu0YE2DEA3P+HDy/eWbuxRhYq3v3HkiAFUz5Eu1OJ2gl9lHKu7jOBD7/XC3\n2bizUBOk8NPtYwY3UjgUPeDAZ6swMeIfM/xeUb/jFkdRW5rd629M7JORLdwD\n7/Vgak96kCl2eCoxMaXoofMmZVQXHffyeYkyleHHDTXoeJK65UbjXlicZTRY\nfcwZA1lFibAZVRsdL7GL2SX5pZwcDs3ylLYDAAFsU1nO1mdoI3PBbn5aK55O\n5wG9eOnY5kJkpYt9jz4HMuVn4OZQagGeRKmOlmX9l7A5+sc0nwspXd5Qdc/l\njvP6\r\n=y7V+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"d5c3609d24375697d6de8d9f3055ba4f033e8875","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.5","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"14.5.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","happner-2":"^11.0.2","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.0","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_6.0.0-smc.787_1597914199670_0.4828461808515472","host":"s3://npm-registry-packages"}},"6.0.0-prerelase.0":{"name":"happner-elastic-proxy","version":"6.0.0-prerelase.0","_id":"happner-elastic-proxy@6.0.0-prerelase.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"4376f5462c9493111576b90b6c17d9920b796229","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-6.0.0-prerelase.0.tgz","fileCount":50,"integrity":"sha512-uTFBInFgKgdbooAHXAgBdNoPwsulLojh1ZdPzxBjWcfiLl7FcxgKA0JH5mK1cJgbr7aIP95Mqt5ayFQ6tZ26vg==","signatures":[{"sig":"MEUCIBNiogvI9/VBt9HWJQIThz9HEIRQ5YHZFrpRY6ivj2DWAiEA5Wtg4R2eVw7qRQpQBDJHjEH6N5TIcIhZ9QacgxL1G80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTRZxCRA9TVsSAnZWagAAxwgQAIQRRT5F+e5gp1JzBKQ9\n+113XMLFQ/vaGpRVU/1qI9t2eVCEyGjmPmBMZFhpGm9gwssUwqAgZYyBcL4G\nKI1mOD1u9vjWk4qSIQltdCS06kvD8yI9v/dmL5rAqht8CI/e/jaQcUw8rDBK\nhC5SdF4bIqScN199/0uZcAWm6Nq9E12x0ZTe7sIIK4KYG9R4JmTg+U2WEqy6\nbQ9swbfV6S5RhsVANP9VCOGk306sKPdg3nq2gygTMNtSA8Nx6s5VhQjAYYHT\nAoI45VLbjABEISX90YhsHln07k28be8UIey36QUOW0daiR8tvInyCwHYhwIF\nevRDB4K9WSJvhzfhKF59uPOM7RGgqzcW36vG4UUr8tbQmW/0Tlh2GrqiRB9q\nermoDDqKdTXeWUK/911+MujKDDKmTKVg0civrxSNLIDf9MXWGmGQeOWfYKhG\n6WkCadDPSwwI7EaMP+GaUv1MG7df0QWcxUnBMyjSpT5educ3nNvuf63dmvxp\n4X2LbzNkwusaDOxz7XhmAo/FqmnMXrZsmQKhYK9HkRqpDOdKPCs+iLdjzqFD\nM7w831LARzXXVVxD/2uZCT41kVQxFzkDK7xZFQ+08yxF4R6IqKE5Qf0ropQQ\nbNVr+kKRW3AWvdMJ17c/hWW/vkr6V7FFnBLWxQBnEQolIGGoQ23AeMh0KgrZ\nMYJq\r\n=CVDI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"5085515cfd28a379712e0645163c17ee60a4b2b2","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.18.3","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","happn-3":"^11.5.3","co-median":"1.1.5","happner-2":"^11.2.16","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.5","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_6.0.0-prerelase.0_1598887537256_0.11365844604918474","host":"s3://npm-registry-packages"}},"7.0.0-prerelase.0":{"name":"happner-elastic-proxy","version":"7.0.0-prerelase.0","_id":"happner-elastic-proxy@7.0.0-prerelase.0","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"48dd70e314717f735ed735643a389eccee8ad465","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.0-prerelase.0.tgz","fileCount":50,"integrity":"sha512-Rg9vn4nrSP7+48GTcEF8jrteyslwDS8dt77ctnBSNVD7Gty6ySBKkthFCkCbUEChyeMYif8b52FgJLr4gBAyFQ==","signatures":[{"sig":"MEUCIBzjAiK4a2nRV+3+mouNbdi47YJtWNrpeCx/Z7IuAAvSAiEAhE36xEcKmMnDjOf2JWy2TMag5O1jwQPBjjHkCybPF80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUjTcCRA9TVsSAnZWagAAlbsQAI4TjTCfzhLdP7ZRtqe3\nwIUTbEGKWbmLlm/x++Nu9AMFGHYGIMUF3QLUfAGWxcMv3Bh9oY9bOXJR3QsK\n1CO+hR+SDHr5n/XDFvKIBNYCoDmOXezWM7rUH4RQd1bHZJdAOvWHlz2ItXcG\nLQUOQl3ZAcHYZ7gx2TebAlkZpye1W+YZEVFzliSwkU0lTfcvv0BEwMuEpV2q\n+4VcA7OH5x+A3H16zeZZXPz0QvA+oaXldrMRLwKjBt3tXWfXyESwQzr+zaAP\nrD+BHm49hGGl0ezNTkBYh8Ckdfn5lm/nfalCpzziE+JPz+J+3nYSruIxMKSs\n8JTB6le75kyXKpwO3QPB8j/Ke4CkGNWo/mur5IgR7ucq5dOwLYb15q1UwlFG\nSc5NfAXKpX2WQgKJnKjXMtKcsbDaIRbCcuUihLoVQCCeSD/qk4loVru439ws\nTo7w1IcklddjS9j+FAbGAxvzuq2KJbMWshVrYDuxBKhCmBwVNZ/MlI4dS0ih\nA9oswKEpFQFd9mQejFIADFakARNehp/YFuPUaYEDSThKADfZHcNP0wyu1L8o\noZRK+17Y1U+/efifAKT07o0OZo56aDxdHT7IzgrEvKEr8kH6Ov+6j7B8OGmR\nVcW2uLiEoj689GCcjmxoc/OFHrMPy9ABOWkTEF/Eca+HAykMpS2WQvLBvwH7\nK8Iw\r\n=wnJ/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"5085515cfd28a379712e0645163c17ee60a4b2b2","scripts":{"test":"mocha silence.js test","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-rules":"mocha silence.js test/rules-engine/*","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.18.3","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","happn-3":"^11.5.3","co-median":"1.1.5","happner-2":"^11.2.16","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.5","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"chai":"3.5.0","mocha":"*","assert":"1.4.0","rimraf":"2.4.4","request":"2.81.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.0-prerelase.0_1599223004231_0.11143533872118838","host":"s3://npm-registry-packages"}},"7.0.0-prerelease.1":{"name":"happner-elastic-proxy","version":"7.0.0-prerelease.1","_id":"happner-elastic-proxy@7.0.0-prerelease.1","maintainers":[{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"b97d3279a6b13f4078bb6abf92bf21ca0f651817","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.0-prerelease.1.tgz","fileCount":28,"integrity":"sha512-2o9fzgxO3xXu6KWxY3Y3N8gcVWZpft8oJRnakJimBWcvbukIhvVFLDFHbASrhIGTr8EHSNjMT3rH6yZoCh3j1g==","signatures":[{"sig":"MEUCIAW1yxKtp8cKZHlMAiQ4ZtK2ebna9yB0MzlcNLJmhHGJAiEA8Lr5Je0EqOxSDoBbfLXXnjtJ4GhAQr+U0/1EE9sP92A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUl5ZCRA9TVsSAnZWagAAjUUP/2Umi3GimkfKI7wIJezJ\nBDd3czyE1ATNBEvhZ1ZoMNF9PCyayukVdyNPux/a5imc85V0ddN8I8ah+mQ9\ntzINzaT9GizO8QVysSxzlH/ezELCKI7OZW+jvBsn7UYXh6ukaoQ3maK9tP2t\ngZLYFFZ7/mh8pdlr5t9LldI4SwQ31nmXUKViHMHoSiVf2wIspY1vDdXnB+AI\nK217FJXgM6aHNG76yeNh2XXhxfhFC+Pk2lJcuaps1AnJajtsmSqsaI0iKwQW\nFEouMTjvw8d35SJIypYCzcToxatnrHcWJ+2Ap4Z80028pp1WOVTMzLynWwZ4\n5KD2YGCmz0rfcwITkeEHPC+g+yGkbtwVNS46oiEQ271a97Tc466bERDuntQ/\nqSlLRYjY6mTbtpthnvlRU1jQuMziY42FEulUT+oqLkLcZioPIVKrNwfsgjNv\nglJhVTRL27d/4ycLt3L5N/tPkvkYP44FPsjg2qPajAOo9KmtaR1OsGEcrxBD\nQh40BV9o0po+cWJj4VOSw6wsxmkR0QP2migS01sekS12UQxXLx5jrs+CJVRE\n9BqzbuoJHCQvU6zJgzGPEQae32DdUDPK3kaU0XRsiW1o9dA60ajJwL3dhcfT\noVKKbdo0jtnkJThl116UdwLb65Q9fx0Mt+D7aTYATi180GxWparYMhDGLcBs\nhL85\r\n=dUmi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"c582e7e670219f69bdc921b5ef2e1a63917d84a4","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.18.3","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","happn-3":"^11.5.3","co-median":"1.1.5","happner-2":"^11.2.16","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","happner-cluster":"^9.0.5","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","await-delay":"^1.0.0","happner-profane":"1.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.0-prerelease.1_1599233625413_0.44970776410056756","host":"s3://npm-registry-packages"}},"7.0.0-prerelease.2":{"name":"happner-elastic-proxy","version":"7.0.0-prerelease.2","_id":"happner-elastic-proxy@7.0.0-prerelease.2","maintainers":[{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"}],"dist":{"shasum":"be6813f28480e1406b15cdb1d000d66dc7056acb","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.0-prerelease.2.tgz","fileCount":28,"integrity":"sha512-FhmdVce6r3tQW+QNb0IdTkacmeFWC/16moKuBzkTsV0qDTcOTwhQ1WS67Vw6m9uvDbZddIbxiux1j45Oodm9fg==","signatures":[{"sig":"MEYCIQCPtMSngdLDoytx225zlQyZsLmd0VNTLX5vlGX9RvKpjwIhALqXp5COdOFA7Zmr85yxQOFFMbpjll5PhBhG5WUvjyFS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW0TrCRA9TVsSAnZWagAAszsP/0d5V63VGNL1wuCQQ0s/\n3IKFIxHmfGBdoQhPQf9sL2LksUqC/7Cq98fMekQgdukqM6U3yME/jcNTn2MC\nvvQRo4qK4mnd+D+HdqXmxchtFCtfzBKMzY+mY5qjeA5SBykk1i3z7GottJfN\nwG3mVfUbkw2a/pzvSMIG71BmkZMA1/TIbX2gPFv9ctbmMLOAMGVl/00VIIhM\nb+1pSh8gzDedFiDQ0vKg/vD9zJvHxD8Aj1BB/PD92/QF3/LgGznzBmkONDPr\nBXpEci/O/pGuk11+kS16jKZ9rqYUH+M7A05mhsaZUel/YoBtoJqDBvf8y0I7\nyK+RLdKUdsTd1mWLgbrpDmVfy0/6XaRw7CfyOrHZ9xLYizbhd859IvVFMDTw\nFFDVKwYEYTa1MGJalrwVFPtGj2EZCf+K0UkQQR6zRVCiE4f/mR0BIKGM3W3U\nXHbXYgJWuTCzH27YVuDg09mFovgO9dqEb+SsfkyH7A0XElmOVjvvUOFN1ECA\nAdfqdwprd6d4IUv/Gw7NpMCwmZvVdsqVsLwp0DPplDrbNFuv0bttDTXhMDiz\ng0I+Nq20nKTdChF27dPX9AcyvRi3xjLAFGRyuTBKv5DAIjJGOgrmmGIIBAHP\nS0OVXj6axsSte+kCQwbF9GqEtEBkDRbShtVpq2SVKyl94HzRABmegEOSijUn\noWQI\r\n=FPp6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"3db6cddc29252fc763dd8f4596c303886f27ad96","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"jeggers","email":"jeggers@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.14.1","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","happn-3":"^11.5.3","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","happn-logger":"0.0.1","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","happn-util-crypto":"^1.0.0","underscore.string":"3.3.4","happn-service-mongo-2":"^3.0.0","happner-elastic-dataprovider":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.0-prerelease.2_1599816939239_0.9357548412167138","host":"s3://npm-registry-packages"}},"7.0.0":{"name":"happner-elastic-proxy","version":"7.0.0","_id":"happner-elastic-proxy@7.0.0","maintainers":[{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"}],"dist":{"shasum":"22292ccfc9dfec29e0bf8dfd09403d6abc3af720","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.0.tgz","fileCount":28,"integrity":"sha512-MXiG0pSaMlkYzr840CXNfcjuq5KCgR0EqmHHC3YZQ+FP7pHmEbISYPijRTLPkZjQfbUAep1MxG7ZcTjYNduhAQ==","signatures":[{"sig":"MEQCIBfe9J48vna/mn8/huF6xZEfhn8kN8WdJNB9VFaFhK/cAiBgSg7UWiMPnwMFfYNa1/6Gg2UGRRYQeUmqV29Rtp4ngQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68513,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW44MCRA9TVsSAnZWagAAu7wP/1pFWhsSSwjtlb5C3Ubu\nSkruAWc3ivjclM2vcYWB/uflIEAQFJA6w9gmbN/lLmrMTGGe7VAuiyKckFsU\nEJpuCIiR47qM8odNwff7AKc7HYEU5HnlWcxnvp3SXBJebJWM2Nrp85uiJpJ4\n10hSp9ATyX6K/W+oiPy+X1rJ93uW/6Z4Q/Bvm2t7MMMPd6O+2W2MZ05PTpiC\nbAQOBGREFXpl1hkCjGoF86N/lBM6d4RQKb1BGykqNFwBpz1dZcfnXfTnxXe7\nYuYV6HhVVQ2BmBlck+0zEdFhl8sXDUkuTWjopasUsCR6+uzIbQBw8yBtm1IX\n80I+urM808hkXp9E3XP6XniSUtgpIdBOxZFKNXNyC05kJZSKYS43napcNblf\na4REU+3cwQR2uZvRhIIUJYFs5IQGwWbaFHzlV5dSrQwB5wSeTSEVFTZk5p5B\neSWC1/IXxbukvT09ThrPE+Bi3YL5ugVB5V8zI4sEBuTuyPzwjBsvGPzKBEK7\nbIfCQB6vZKU2HefXtxWqHOzqTNCUU4tUL+B1afZVPuZv2V+8kb4Rl0XPQXvi\ntAC285AJhJG3z557rz9IOlwpvIJ2Zr6CxiseuWinsRG8xnkZxZh3mXArgjIi\nFL4tFcSSt2x0fH2fGKEJ8Dx+a+dB9rHMd+Wt2Y4vUWJdpupZXvNDowNZHp5i\n8Lx6\r\n=KppW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"a113aebe1803f185a47b0c26786d0116139250e2","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.18.3","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.0_1599835660378_0.044434706806591784","host":"s3://npm-registry-packages"}},"7.0.1-smc606-1":{"name":"happner-elastic-proxy","version":"7.0.1-smc606-1","_id":"happner-elastic-proxy@7.0.1-smc606-1","maintainers":[{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"}],"dist":{"shasum":"8dfce6338e8f51c633e9282c41eb9ab8d8665301","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.1-smc606-1.tgz","fileCount":28,"integrity":"sha512-w3YDByeZ72qlDNhjkHiavDYkR69RLnsMcBhT0GX/1KBd9pfjaKDU0QwaasfTAyTUJnY4HFqKxLVuVXECpAl3Eg==","signatures":[{"sig":"MEQCIH83GWZLA1RFja+Gzxf3oQL49zeAFNs76I73VXK3ee/ZAiB0TIsus16Rvh2jqI3V1uZxkgy1YhOnwsDESxgMo//wtA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYztSCRA9TVsSAnZWagAAI8sP/j0NW3eGoQUR9iFyte/6\n5FwgdgjgJfmux+ujibahwZ7PDeYKU2aV+00frmFqhZnOg+ROemZmaIw3XulA\nRTwzwHMRioFTSVRaCSN+RaB0rlHRFS86yFlF8BccRYR6Y9cG6vfYrvv25QSa\nUrGZACwDLhfu0R/7Jbktv5Dl+nzvwqTAu3hzU5sPibVz6vbU9hQcptsr/q4F\nRTpwyoJCE/Kqgjj+1ULzbQnTcY/Fj4flVxO6tGFGd+aEHFlZhhc/JYlHCofn\nDm+/suODo069yZV9pSylETd6ba/9xig/+zQJyr81I8qDR2DYXf/Z1ZBuctVE\n0GciH+1YN1nya5t1vHpfncfstIQwIp6LrC2lW9hs1/KCt+J/fJcZcWQaKuEV\n3FFg0rsEGbrK0EtoaEd5N5/iCTI0viNPKn4BuHoRH2pZ2HZCkPqNx+MKBamX\nH/6eYOWbdHpkLOJfN6TW1KXOZ8IpftPCrQIyLy25PHNiyOB+6nc3tUO9ndnH\nBOtmhu0ZOBbw1A4/trdbTcTOCxPW6gFJWBRyUrEaknuA5ghXo1Ti488KynDS\nz28nGHLTYO9OIxqweIR5oYzOYYtN8WndHBrItb7mi3+JfeZYfLeSYCysy0LA\noiXLd2knLdII9fYRxGW9ouwx78gJNLqVeGUCCcdwcIuYaUnCVQ7y1aM5Cz2J\nx8y1\r\n=30R0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"6060074a60ffa458d09765cef722be249b424212","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.6","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.18.3","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.1-smc606-1_1600338770171_0.5812751832439969","host":"s3://npm-registry-packages"}},"7.0.1":{"name":"happner-elastic-proxy","version":"7.0.1","_id":"happner-elastic-proxy@7.0.1","maintainers":[{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"}],"dist":{"shasum":"5dc81d4f26c5e6efd08e0defa3c47c93e534d2cb","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.1.tgz","fileCount":28,"integrity":"sha512-M4VDwds026Y3VutcQDLaQIRPSfO0MMICp93ToshuobqsklqZ2rHfBnUJf87Hpj89eGnDXoC/mJqrG1UzOJxnKQ==","signatures":[{"sig":"MEUCIGTKr5GKTfIbedHJv0hPJtw3Vb2ZxSBM8MwxGtFQUZaXAiEA28XZ2FtrA9pbkg3Wf9eBNJ8kY6rOnVyxm8K9migvXvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdctVCRA9TVsSAnZWagAAxCwQAJeCacGsRn0dUUAaXL+/\noppFFHvicDWrVlNATX5SdceHs4P/iHJ/SszIri3YJgrvnIchd+fqts0xDWrG\nLB6GbmJM10C57e/DJJ07pAk7dzl3LsjBXISCJhKO6z8SrcPTZm6MZpvzQGnl\n7LfyQrYRP5/SWsvjFibPNdLvrpAJP1XpDxAI/lUXiZKsvcNPXfF7VOvfBno/\nXujRBkoSyXxuhNm4rr50rOF3RSipiLo6CQMcPYrusV/+bsUuEusESwIhngqJ\n0q9obXgQxu9nbDf0rZPqUGDVQxof0o+gHhNo2VSegKYfQuUVNbbcBBJNk4Ha\nDWLfOwjIJSYYdMKLOVRxNP0euCNBIV6WCFrFBR3nQM76lXrmNgjFYtMHJa6G\nqXv1yxsQWKiEScAPbTi5ivMHP31PzIj4QG6pT+oPTq6x3ToYJsA6LJKDgo75\nAGKu4CLMTbKCyNGKgoaiSmYZYHasMtmeAuek/PQeHhXzmlbYUCzV3D4AbNsH\nzQ0OEa17X0uYhGr5XStonAKRWS+IE2tAfKf2sl1oyorO95hMSTScCUc0cOlz\nmcYupj+IBgt3zRajUiVIrWPdkw6W+fXYm3uC2zL/vRD+xXAPBmx1k4eHKmHr\nxe1CaTjmsq+b4KMk8M8EZ6QfnGcAc1ByJezj8Ipq5VOZuqvvSJyC/TetT7W2\naPav\r\n=Vmpu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"c7d054e11a3bbf5b45b918487c29f4b5349f3572","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"jeggers","email":"jeggers@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.16.2","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.1_1601555284600_0.04502075624032531","host":"s3://npm-registry-packages"}},"7.0.2":{"name":"happner-elastic-proxy","version":"7.0.2","_id":"happner-elastic-proxy@7.0.2","maintainers":[{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"}],"dist":{"shasum":"583b674bbe81e8360808295874f43415411a5670","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.2.tgz","fileCount":28,"integrity":"sha512-nBMVmj4Q58U7kbwQqTF/M7X2bX2GZciggtaEBSNLTSuNSc/lnBoKc6jEVXkAM0vZkfIQFL3KVWaNN0gTsDSQtg==","signatures":[{"sig":"MEYCIQCfemd9zxLT/poBpjRYV1U5tCooK3Gp023rTxrnEzmR3wIhAL+g9DiR85McBFKeh+Oio6OBGeh8EBBIzpeMReJmbkB1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffulVCRA9TVsSAnZWagAAA54P/0VgTdV/ewQo2MTGokhX\nEjDfUgJvRYOZbOrwayosWsRFRNZXjWNvl6EXYbgrmcC6NvlHwBSw8xi5EQdq\nHb5+CwFjHJsZWtxfXatgiIXXGelKVweU4RxnT+LD8p2qjL+SFaZgByzg4o2S\nOI1UhqxKx6siCNG48bYOBE0F5Akpb8/Ibz6wPEwSdRQSL3aPZAm4TrQnRFVP\nDsfsyP9CWTXDFK7bgNHpTE3McIY9JaBbvveBELZJzfoxDGXZO4CTvjqjFUkU\nBge0aQtJM2/13L7IUF+AyfEeEPlgdTL0Z417jmnS8dodEDej8OH7TwulYXY2\niwBarg+/lHMVasEF6B5hbs0b9hYktTE8guUzCPf+RknnvtNn/5qd679xkFB8\nRH16oKbxN3DuI6qFkzTE4c8WjF1RT4fDYD7ztGcHkamzw0lnhUyJ9zRmB5so\nhwLH8jCYsoTWR8401r9k5uMXQ7aAyqGEVe+beB+5JML1hgkZG90nAsRIUvEq\njBKbpr/4MeBlmJR8agWScsHp9SXzBGm5ELoCxv+nakPeQVU7BvzUJxKx8YLK\nHhmKYxc4PDDb6zlyIUx8I+kl2Uqm3nsMEMxlp1kI/rDc2+E2ZKs2+y0xNUro\nchLyB/v3JxFxvuojRtp8MjxvcqooxIupKpGib4urQc/3KHLZrLNSbgkkJlfF\nH2NU\r\n=OfDz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"72e0caa44ec2174cdb47aa463b182ec565436c9a","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"jeggers","email":"jeggers@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.14.1","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.2_1602152788824_0.41052248312652795","host":"s3://npm-registry-packages"}},"7.0.3-prerelease-1":{"name":"happner-elastic-proxy","version":"7.0.3-prerelease-1","_id":"happner-elastic-proxy@7.0.3-prerelease-1","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"}],"dist":{"shasum":"80cc882908643338ff23a3ca9ab36b2ff52c6fe9","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.3-prerelease-1.tgz","fileCount":33,"integrity":"sha512-UBAKGA0B97xIXjy4xGxSlprsfece90xY6OTImWmIM2r9TB/4lhg1+yiu7HnVHOJdX9WtVSWaui6NPSHIVOQVCg==","signatures":[{"sig":"MEUCIQDbAqcnf0anwMuKZQtk/sHUDJ2vNuCN3+V7Ah9pHfUh8AIgSmJdz6yF6WVct21M1cLqI8ZH4DH8F2DaTtlQFsI+F6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgI9wtCRA9TVsSAnZWagAAvFQP/jJFVWJl8b2Fa4umlLhz\nnbmTwEAgiI+zRD5RWWn4b9hyu7RfmsYml3alfzCx731jnUPAxAP99Gsz6B8L\npMscK7PBpJCe6O+KttwEvY1P5Gq/iLx8frbvhHKm01SzSEgJyvNSGrcR33q3\nJQMqnx/QCicwAnrsmkns2Hh/mRModTSGrmGJMjZObWKKPn0w+GUTteNgp1WI\n6DV8ZrbxF8KJyeYt75PopxbzsFwCTLN+9YN3RmBAvv+9Yx8DM6sn7V8yYkvR\nDQZZgCdVy/RGPscw4cNq04zqbmg8imhKpyppQhp3xDMCIidgJ1byORuD2v6K\ngCbLwMkMEKl+nfVLXOzoNfvjqjy73yQDXSuR9Zng3sDn8H6mnGysJC66VOQZ\nqe+gGD9w3l4BiLxyJ3O4vDZHqw+9Xm++Mj8zOXfVb/3PXYH7WRIJeV5TzZQR\n6yvmOrFB6g/YaQLhqJl7wArkd7b0RpauVc24IZfd1hntACR1xmziRz+qf4kT\naBGFhFcWhnzqR3OhiyvPX10+RDjFMjuLrEAITUTgT14MQU5bHJmBiyzj+pDP\nYH87UB/TCCzyiCb8BGONhVw/nqV1N/v++x/SbTw3l1x73G9xWSsMrMcwDPeu\neHwwPLnFow3gKerD4GiUV+i2Czq011FNfS2xU9vO3BIRUKDRhMdL9nBjm5EA\nl4JS\r\n=qLjT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"d4d3a367b30285bc3dd8aa3d50be95c4efea2b1a","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.19.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.3-prerelease-1_1612962861354_0.3225836482152349","host":"s3://npm-registry-packages"}},"7.0.3-prerelease-2":{"name":"happner-elastic-proxy","version":"7.0.3-prerelease-2","_id":"happner-elastic-proxy@7.0.3-prerelease-2","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"}],"dist":{"shasum":"9bfe58a92dc29081959917b070dc2a40e24477cb","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.3-prerelease-2.tgz","fileCount":33,"integrity":"sha512-O5tLSEieRyYdbE3PM5HNjEApGrnTWCWDqgElEge+3Bxg5WTkgyQe+I+5gAwHDucC0a2F7X7yKneDLiAzuyZ4bA==","signatures":[{"sig":"MEQCIByh5GfiC3yQrlV5/iI/l+tR0DWOurl6xLBWf32FRZVuAiBzShFUZFHN/hbRgU9vjW09uOieKM0IWZjBc5f86AueNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgI/FbCRA9TVsSAnZWagAAaQsP/2m4qc1vmlPIsHdrNuyW\nHCJI60roHDi18A2BZJeSgbOjpifTWADLyTxsk7fpzkpYTl7fw0Rp7Pd9wMgk\nPvLtI8JD8aI3VPfkcIhzgGTYiN3I9QlejD2eZn6CGdUXWqWQDVusjNSn7ot/\nq0Npnz8exdnmW8mS7JKAVB4q/hosm3x3azRbyNYdSG2J4Zuw3ajX9uwI0OtI\nkAfOxG8hz5JvcxmJRt2BeFtimtqrG2hjE8C+ArB600wYYovf0fB+oA3NPde0\nVGApKAkxhqFJkujfSkYloB5ZclxYnoTXo0TcBiZcua1ZORDYhEA+P1XxQt0v\n4DMleCAR9Fv7S4E75PZX1hot78d8iKL9bXOsHKb5Y1lm0CanssTQLrh3pAPN\n3ykicfhYEhnEESmGopZ5XHJZ8MkEU/00NpGX0vVs8p03z1rumXTjLWRgwxIj\nXskmzMt5rc1iGbDNd72GwCiM+2KmyeeVpC46ILgGTPonmiacg9DZ67+/Gyo/\nIg3Nnsm5QheE5ZC+4olzm7/gCiTzd16TQ7kuApygfHZARJiLnldlprcW5QC0\nmrqpP18KkMwntOJxEpjAsDi//zKeY+ZZQGZrUZGXgaQEdb1fIlfg1LdSDse5\nclepn5ozLPUmuh+gAkLXR532eL9Ajae+zv2QyrGl9/JCZFg0UfgGoHVZeWiA\nJvy3\r\n=Q9U+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n### prerequisites:\n\nnode v7+\n\nnpm\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check","gitHead":"66b9d5fe03748711c3614e81144d870cb77a7c6f","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.19.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.3-prerelease-2_1612968283429_0.5718180350727817","host":"s3://npm-registry-packages"}},"7.0.3":{"name":"happner-elastic-proxy","version":"7.0.3","_id":"happner-elastic-proxy@7.0.3","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jeggers@sierramonitor.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"sukhwant","email":"sukhwant.sss@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"}],"dist":{"shasum":"8214884a39511278a903f643073a00c544868230","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.3.tgz","fileCount":33,"integrity":"sha512-kg7xGBOCb8OC2mRvewMRP7qnWX6QbGACrPq2IGaAHhV6eB0Xa5f7h+fBOsPg5IBkq3aRyrDxc9ZVDm0VdLOECw==","signatures":[{"sig":"MEUCICKbf2lr49Xcz2fkSlY6uCpSWZdBk7n4IVrKAvLVk7FUAiEAl+biFigEVUCVyS7XR1+OSdVV8pssvqc2rkpW6pIqjFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJOdXCRA9TVsSAnZWagAA+esP+wWPgCzIHFOZrzpD4V6p\nhjl6rk0LdD9aSO7cpwMesRMgT3skg59jDi1QVCOphMWro+gNAylYNCwVYDFr\n5NgW1NsNRIiyn8iykuOqjABUJ6Z+Z5wFEFtMRvOl971uqGtHbDyOZsL1IEnU\nTowOg2aNu3RtBJVLTKlkdTJoZcHZVgolWOAMpqq3MOOrMdubhSvYEY91Psjw\n96yBU53WFqcXaTOUZvvZ0gTVznLhRUbBUeYje/CHiZWUx3ipSyxx+M8ejUvn\n6RDpwJVdnr/H0oYGUqVt3/Uogck1HVU0EKqNNSObTcQ59o13DNG9z8Yfrt/w\n9rBo8Cztey+qQRGmLkj52nhqCOM3IDnhLmNQG8r0vcotIGmTnrQPThJeXEgW\ny2fMvGStGTJbW+nBVRcy2FDtmBkdC3jXWlkpOrHy0JBia6ZimvTPLNmTVqxe\nX0hZv5oGppQ7hrNrC1oOF0DVVvFkEWHI1FJ6iUpaNSm97Uw4GPNdbdFdk5B8\nnCgHOqdLdTjeBFSWtgFRGpsdfAlGfwdgGLXSL4eQeLwA6jEzdo2YP+/fxtY1\nCXFCRBA1n2e97FBNUgib1VpvfzKSyj/msuj1kD2z8SN7JiaApooHZ8s5u9As\n2ITaWAkgxW1ENxZucXokcpM1cN59D+3OouMfKiijSEvQikSNXV0ScaqV9Vzb\ncF23\r\n=0ldT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"5bdd01a2528dec44e31fac8a1e0307a082505abe","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"12.19.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.3_1613031255008_0.9588010676431675","host":"s3://npm-registry-packages"}},"7.0.4":{"name":"happner-elastic-proxy","version":"7.0.4","_id":"happner-elastic-proxy@7.0.4","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jens.eggers@safetyio.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"chrisndala","email":"christian.nseka@safetyio.com"}],"dist":{"shasum":"549c035884248f9dab3d4f7210115b143fa79053","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-7.0.4.tgz","fileCount":33,"integrity":"sha512-vIBLtUo/jH0spQAscNTgYhn0wmy+gmv3qzKQF6fAXoc8c0WyzX05flqfeKaxDEr/YNfJYG4/50rAJrdsKvQX4w==","signatures":[{"sig":"MEUCIQC+E2xaDgLQA/+45GRwr9m+ASdCUXjkCYHPD0Sch8CozQIgA4r5SIqCExPLGB9xq6C9EmH92CAAbZIvp5BtLExK+Io=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2tCQCRA9TVsSAnZWagAAkXkP/j0nW5BBPhA5h0mzNhvn\n2afVzb5QXtanvt+3+oVoRxejs+iqEmEK1ODkC71tTgJbN7FkA9va3Zs++7Qo\nr/K/5c/T52Tfdm9m4l3NJqyOr7QKTNsRpPUr2Gfa6W8IEdaQQMrs7tH9X5aA\nO3CPxZwaW98y+IL598Sl3V3KTEhbGgJjjogMcQPCl2ScVbbhyYFwlwYYv3fZ\nmR8GRNQfPxyAC1SVDLzgL3M5TETnVSshNpZvwS0wf5bH/yE9k5i9AyiKmA+d\n5Bv9GtMNevCduas/cjoP5GhevtKNUWhTAJvwbsfCU20lmjmZIpB9MVKYxh13\n0sEsOjSZW0OmA3meoAQAUoxu6hN2qJQwd+8H0QPxTEcO4BMzt+LIje/o/iJ8\nlx2qhWFRZ/v/wxtbSVaqwB9cSK13IzYbomlzCvWg5lBlmzXFr/7Z0vNKc2EM\nj9THaDdXFf3QvnUxB12O413YCBHDVDa9209LKH/EfMtpJ4c5IrWDcCMZwM3Z\nWP76kVAr50KXnJOZoA7Wt/labZ0RB3ISCmbQ6s040bh7hTT8pwCivsH+hA69\nT9IeYVeV9hIvF5Ir7Skpk2de28NiKep1EZOjiuUeOrXpEiKtugBiawqhnqYD\njnT08nPwsX2xbQwxbOmVXQYhzrQ4CvqRy5zSrzmHt9aau4MWPQnTvLI2eJwz\n2Nvs\r\n=Rs1N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"5311c7dd02c0b7041a5a911bc42eba9eacb87642","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},"_npmVersion":"6.14.8","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"10.19.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"^11.4.3","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_7.0.4_1634221223288_0.9064022439658197","host":"s3://npm-registry-packages"}},"8.0.0-beta.1":{"name":"happner-elastic-proxy","version":"8.0.0-beta.1","_id":"happner-elastic-proxy@8.0.0-beta.1","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jens.eggers@safetyio.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"chrisndala","email":"christian.nseka@safetyio.com"}],"dist":{"shasum":"81a2dacd4d24fdfd11240eec88e7fd311dbb2b5a","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-8.0.0-beta.1.tgz","fileCount":33,"integrity":"sha512-yEHRJb85Jp+PgOhN1cmEVN8UH7WbNH4jRAdnzYos/SK0sjClLGuDZFZm5OJA2lPQFD+ND+bVfyvD8sEmoMyLnA==","signatures":[{"sig":"MEUCIQDCxc0J9Rz87BICfUHXlNns6RAfMxPwIIw2M9oFUJJZ2gIgEK1TtYs06e0CIttAXAl0tXH6WF7fzWdpuJCH7uEaDf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBORQCRA9TVsSAnZWagAA2rUQAI1lXljeV6NP5LM3qKB3\nGPjeTnO25tRig/kGwVwNBKvVgUlwfo1TdwJxrIxa7OXOMxJ7snQwfgld/bfP\nT+sZ8HAcxi9Tm3nPkwtBSP6DeqvEVbs6XJsPUkijVIy5wPQc/OJOllOFpG4a\nwH8HaJu9xePEdFz72L6VY12Ifmwh/PaQ/Rz+zPe2XloPoui7M80UGzgnZ2m3\nheMNr6Xsda1VW9zRVJ5YeB7CO5nVhcDPWumHGcnwkt5waokFdT7krg0vsCnX\n7z+okvwVhWXT+K1YWEwDVDWfFpn8y1hqzj8iPBGaL7dS1f6b2hrGRHs2cv0s\nnoS53bQxrSl9e01HI8VyUm+JjTS9f7k008DkBk2+5gOyYPL/0pPT8ta1xnIs\n3Qzuv0TYjIkGi55GNlChnKoJQ0q4lltVL+RKRVIRWj09yfLd2s2+xF/F8kme\nzd6NX3clRQaFjM1o1U4FDL1lLVTdjlJXy2mc/ZeqnW6MyYXDboClMkPX4Qgu\n6WIbxKIdSlpIAmKj3RoDY0WqDhR/rhKG3DVKPv5fJJfeSijkxAvyyGWG8HaS\ng8eZ+ylGLC2SzMzw3SMW3J0sUkoouGHqTww+sbeCHfRJPoO4VxfimRS0TjAY\nofIPMay+Yc5GClAYwp2jUgMVe0Uqge1P+ckBmRbOUzcmNFVPvOYoyPQPKCjL\nnS4L\r\n=/iya\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","readme":"happner elastic proxy\n----------------------------\n\n## prerequisites:\n\nnode v7+\n\nnpm\n\nrun the 3 services\n\n### OPTION 1: Install and run services\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### OPTION 2: Start services up in dockers\n\n```bash\ndocker-compose up\n```\n\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check\n","gitHead":"4fd5fd3969c1c28df43d065908a971f8f09dc806","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},"_npmVersion":"8.1.0","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"16.12.0","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"*","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_8.0.0-beta.1_1644487760755_0.46459664435787684","host":"s3://npm-registry-packages"}},"8.0.0":{"name":"happner-elastic-proxy","version":"8.0.0","_id":"happner-elastic-proxy@8.0.0","maintainers":[{"name":"johanvdwest","email":"jvdwest@gmail.com"},{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},{"name":"csampsonza","email":"csampson.za@gmail.com"},{"name":"mrstruwig","email":"mrstruwig@gmail.com"},{"name":"smc-admin","email":"jens.eggers@safetyio.com"},{"name":"jeggers","email":"jens.eggers@safetyio.com"},{"name":"henno","email":"hesterhuyse@sierramonitor.com"},{"name":"cyrussalem","email":"salem.cyrus@gmail.com"},{"name":"benniedewet","email":"benniedewet@gmail.com"},{"name":"rnieuwoudt","email":"riaan6060@gmail.com"},{"name":"dbacon","email":"dylanbacon74@gmail.com"},{"name":"smc-tenacious","email":"eggers.jens@gmail.com"},{"name":"erasmusjw","email":"Erasmusjw@gmail.com"},{"name":"amirshap","email":"amir.shapira@safetyio.com"},{"name":"chrisndala","email":"christian.nseka@safetyio.com"}],"dist":{"shasum":"ce5c14590891771db15e2101b797ff8b0c5ae3be","tarball":"https://registry.npmjs.org/happner-elastic-proxy/-/happner-elastic-proxy-8.0.0.tgz","fileCount":33,"integrity":"sha512-6OBQwsty+hA28t1aFXS2J8pqDXj3gjc7mhUU4935mdwsBLJTf9wHNvU8qm4LlR/OVu1ChguaQKke5sGk5hz4LQ==","signatures":[{"sig":"MEYCIQDYNCK7cTtues8X6IwIKi0McwGGJVQ1747BV5DOGhjYBAIhAN/KDixw8ln0jMmLN5j5JlWJ3n924ieYl+CTxIkSdxmH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":73729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFxR9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyHQ/+NmlVkqD5xwgUnS3y5c+tq51BXREy1vc7YYSWGHtJCV9PhYAf\r\nVE3WR3qj02oYhccm/6xTx/lMbkBJYf6A5Spu7ruMPDiaq6rwiHWp9D9Xh3D+\r\nFwTPKmR/0PqVp0AcrH/5jNqHj66KqcfP8N6iXArvL37XSJ07x0Og3TI3YGYb\r\n4DbNFUkrz0HwuZmuugUupPCOg+hYrkZs5uyk5vOliEAvBz6wKlNACpgBNjmQ\r\nBTBqH6/QxAlUOWKr3c/GOadWpwL9BG2F3RHhvbnlhBltokU6zl1tyV/RYGZB\r\n/VJYcf9j9f/V5sMaFhV21SvrK+kXjwFhW/PEPBj1WA3jFbyGzEVuwNjA1gK2\r\n4fSb1vms2sqvlW4DOXfPHO78EgGL35p/gzp/hyHWDqTd3GFrw9hQ20VzpU7m\r\nGDQ/nOwbaPeMlrh8UIVj3VckzYckUJEmJ/VwUmc+T6mI8GbJv7TMPy/hD2Zr\r\nIPqifNtRBI1L89d85dsIUndqnIkjm7S13p1ScT+r13GhLuy0mIBG18tdFv1R\r\nsFnqefMfJ2okXMFEB8KUFH/qpD7n79TVfdHNESs3XsDRhE9WQ/Ktg94GesiL\r\nphkwz/UNQCGS4BuJPiHq9kirNR3PA1HVpq3XtlW24z/1lw5F7BCnV+rx6ASm\r\nmflU5Znz867xvz7kGxm2awAVomuMKsha7O0=\r\n=BZ3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","gitHead":"8b56376957ee6cf905acc1db06fcbb4a40d49e1d","scripts":{"lint":"eslint '**/*.js'","test":"npm run lint && mocha silence.js test","report":"nyc report --reporter=text --reporter=lcov --reporter=text-summary && nyc report --reporter=text --reporter=text-summary > coverage.txt","coverage":"npm run test-cover && npm run report","lint-fix":"eslint '**/*.js' --fix","coveralls":"npm run test-cover && nyc report --reporter=text-lcov | coveralls","test-func":"mocha silence.js test/1-func.js","test-perf":"mocha silence.js test/3-perf.js","test-cover":"env LOG_LEVEL=off nyc --reporter=none mocha","test-rules":"mocha silence.js test/rules-engine/*","postpublish":"npm access grant read-write smc:smc-developers happner-elastic-proxy & npm access grant read-only smc:smc-read-only happner-elastic-proxy","test-sanity":"mocha silence.js test/2-sanity.js"},"_npmUser":{"name":"cordell.calitz","email":"ccalitz@sierramonitor.com"},"_npmVersion":"8.1.2","description":"happner elastic proxy ----------------------------","directories":{},"_nodeVersion":"16.13.2","dependencies":{"ip":"^1.1.5","uuid":"3.1.0","async":"2.5.0","colors":"1.1.2","lodash":"^4.17.15","co-median":"1.1.5","lru-cache":"4.1.1","wild-pare":"5.0.0","wild-proxy":"^4.0.4","elasticsearch":"13.2.0","redis-lru-cache":"0.1.0","underscore.string":"3.3.4"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","mocha":"^8.1.3","assert":"1.4.0","eslint":"^7.8.1","rimraf":"^3.0.2","request":"2.81.0","prettier":"^2.1.1","coveralls":"^3.1.0","expect.js":"0.3.1","happner-2":"*","await-delay":"^1.0.0","happner-cluster":"^9.0.8","happner-profane":"1.0.0","happn-service-mongo-2":"^3.0.0","eslint-config-prettier":"^6.11.0","eslint-plugin-prettier":"^3.1.4","happner-elastic-dataprovider":"^4.0.0"},"peerDependencies":{"happner-elastic-dataprovider":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/happner-elastic-proxy_8.0.0_1645679741000_0.04367824653263552","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-11-08T19:50:49.464Z","modified":"2026-07-15T14:28:43.262Z","2.0.0":"2017-11-08T19:50:49.464Z","4.0.0":"2018-03-14T08:10:42.467Z","4.2.1":"2018-04-25T08:21:12.385Z","5.1.0-TR4243-0":"2019-08-20T12:52:13.334Z","5.1.0-TR4243-1":"2019-08-23T09:57:41.779Z","5.1.0-TR4243-2":"2019-09-05T11:14:17.870Z","5.1.0-TR4243-3":"2019-09-10T07:34:09.489Z","5.1.0":"2019-09-19T16:00:27.430Z","6.0.0":"2020-01-17T12:34:43.025Z","6.0.1":"2020-06-04T07:33:35.254Z","6.0.2":"2020-07-15T06:44:33.713Z","6.0.0-smc.787":"2020-08-20T09:03:19.800Z","6.0.0-prerelase.0":"2020-08-31T15:25:37.358Z","7.0.0-prerelase.0":"2020-09-04T12:36:44.382Z","7.0.0-prerelease.1":"2020-09-04T15:33:45.551Z","7.0.0-prerelease.2":"2020-09-11T09:35:39.340Z","7.0.0":"2020-09-11T14:47:40.506Z","7.0.1-smc606-1":"2020-09-17T10:32:50.317Z","7.0.1":"2020-10-01T12:28:04.771Z","7.0.2":"2020-10-08T10:26:28.962Z","7.0.3-prerelease-1":"2021-02-10T13:14:21.474Z","7.0.3-prerelease-2":"2021-02-10T14:44:43.584Z","7.0.3":"2021-02-11T08:14:15.160Z","7.0.4":"2021-10-14T14:20:23.412Z","8.0.0-beta.1":"2022-02-10T10:09:20.909Z","8.0.0":"2022-02-24T05:15:41.179Z"},"description":"happner elastic proxy ----------------------------","maintainers":[{"email":"jvdwest@gmail.com","name":"johanvdwest"},{"email":"craig.sampson+npm@safetyio.com","name":"csampsonza"},{"email":"mrstruwig@gmail.com","name":"mrstruwig"},{"email":"johan.vanderwesthuizen@safetyio.com","name":"smc-admin"},{"email":"jens.eggers@safetyio.com","name":"jeggers"},{"email":"salem.cyrus@gmail.com","name":"cyrussalem"},{"email":"dylanbacon74@gmail.com","name":"dbacon"},{"email":"justin.koevort@safetyio.com","name":"justin.koevort"},{"email":"riaan6060@gmail.com","name":"rnieuwoudt"},{"email":"Erasmusjw@gmail.com","name":"erasmusjw"},{"email":"simon.bishop.za@gmail.com","name":"simonbishopza"},{"email":"justin.creighton@safetyio.com","name":"justin_creighton"},{"email":"brendan.sahli@safetyio.com","name":"bsahli77"},{"email":"luke.evertson@safetyio.com","name":"sixlukey"},{"email":"christopher.bayerlein@msasafety.com","name":"cbayerlein_msa"},{"email":"leebow@protonmail.com","name":"leebow"},{"email":"keeganfrieslaar@gmail.com","name":"keeganfrieslaar"},{"email":"gideon.daniels@safetyio.com","name":"gideon-daniels"},{"email":"aaron@the-marais.family","name":"gear4s"},{"email":"lufuno.tshishivhiri@safetyio.com","name":"lufuno_safetyio"},{"email":"39cassimr88@msasafety.com","name":"rashaad_msa"},{"email":"control@saigenterprises.com","name":"sukhwants"},{"email":"karabo.sithole@safetyio.com","name":"karabosits"},{"email":"adam.owyoung@msasafety.com","name":"aowyoung"},{"email":"neal.trias@msasafety.com","name":"nct1215"},{"email":"ayesha.galant@safetyio.com","name":"ayesha_galant"},{"email":"cordell.calitz@gmail.com","name":"cordell.calitz"},{"email":"johan.vanderwesthuizen+npm-smc-tenacious@safetyio.com","name":"smc-tenacious"}],"readme":"happner elastic proxy\n----------------------------\n\n## prerequisites:\n\nnode v7+\n\nnpm\n\nrun the 3 services\n\n### OPTION 1: Install and run services\n\n##### [elasticsearch 5.4](https://www.elastic.co/blog/elasticsearch-5-4-0-released)\n\n##### [kibana 5.4](https://www.elastic.co/blog/kibana-5-4-0-released)\n\n##### [redis server](https://redis.io/topics/quickstart)\n\n### OPTION 2: Start services up in dockers\n\n```bash\ndocker-compose up\n```\n\n\n### installation instructions:\n\n```bash\n\n#install deps\nnpm install happner-elastic-proxy\n#test run\nnpm test\n\nrun the service locally:\ngit clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install && node service/start proxy\n```\n\n#### running the proxy service:\n\n##### assuming kibana and elasticsearch is on the same machine, and we have all the prerequisites installed:\n\n1. modify kibana.yml:\n\n```vi\n\nelasticsearch.url: \"http://localhost:55555\"\nelasticsearch.customHeaders: { \"kibana_server_secret\" : \"username=_ADMIN&password=happn\" }\nelasticsearch.requestHeadersWhitelist: [ authorization, cookie ]\n\n```\n2. download and run proxy:\n\n```bash\n\n> git clone https://github.com/happner/happner-elastic-proxy.git && cd happner-elastic-proxy && npm install\n\n> node service/start proxy\n\n# to start the proxy with non-default settings:\n\n> node service/start proxy=proxy.port=55555,proxy.target=http://localhost:9200,proxy.log_output=true,proxy.log_output_errors_only=true\n\n# if log_output=true - requests are logged to the console\n# the elasticURL is adjusted to point to the elastic service, elastic requests are proxied to\n```\n\n3. navigate to http://localhost:4444/app/kibana and check proxy-ing is working.\n\n#### running the proxy as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\n//starts the proxy service, we test pushing requests through it to elasticsearch, default listen port 55555 and target http://localhost:9200\n\nvar Service = require('happner-elastic-feed');\n\nvar proxyConfig = {};\n\nvar proxyService = new Service();\n\nvar http = require('http');\n\nproxyService\n\n    .proxy(proxyConfig)\n\n    .then(function () {\n\n      http.get({\n        host: 'localhost',\n        port: 55555,\n        path: '/_cat/indices?v'\n      }, function(res) {\n\n        var body = '';\n\n        res.on('data', function(chunk) {\n          body += chunk;\n        });\n\n        res.on('end', function() {\n\n          console.log('successfully queried :::', body);\n\n          proxyService.stop()\n            .then(function(){\n              done();\n            })\n            .catch(done)\n        });\n\n      }).on('error', function(e) {\n        done(e);\n      });\n    })\n    .catch(function(e){\n      done(e);\n    })\n\n\n```\n\nfor detailed proxy usage [have a look at the tests](https://github.com/happner/happner-elastic-proxy/blob/master/test/1-func.js#L671).\n\nHappner setup instructions in more detail [here](https://github.com/happner/happner/blob/master/docs/walkthrough/the-basics.md).\n\n#### running the system as a component:\n\n```bash\n\nnpm i happner-elastic-proxy --save\n\n```\n\n```javascript\n\nvar Service = require('happner-elastic-proxy');\n\nvar service = new Service();\n\nvar proxyConfig = {\n\n};\n\nservice\n.proxy(proxyConfig)\n.then(function () {\n //do something else\n})\n\n\n```\n### TODOS:\n\n- finish performance analysis tagging proxy\n- create proxy with permissions check\n","readmeFilename":"readme.md"}