Open alexanderjsx opened 7 years ago
It looks like the searchExists()
API was removed in the easticsearch.js 5.0 API update.
As a workaround, you should be able to request the 2.4 API using the apiVersion
field in the Elasticsearch config object you pass to the monitor()
API of appmetrics-elk
, eg.
var config = {
apiVersion = '2.4'
}
var appmetrics = require('appmetrics-elk').monitor(config);
Solution of @seabaylea works for me
[Mon Aug 21 18:08:45 2017] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 1.2.0.201612012154 (Agent Core 3.1.0) [Mon Aug 21 18:08:45 2017] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883 /project/academic/node_modules/appmetrics-elk/lib/appmetrics-elk.js:70 esearch.searchExists({ ^
TypeError: esearch.searchExists is not a function
at Object.monitor (/project/academic/node_modules/appmetrics-elk/lib/appmetrics-elk.js:70:13)
at Object.
node -version: 6.10 elastic server -varsion: 5.5
I try above api version but it not working, help me
var config = { host: 'http://172.28.49.13:9200', apiVersion: 2.4 } var appmetrics = require('appmetrics-elk').monitor(); appmetrics.disable('mysql'); // disable MySQL monitoring
I updated package.json to: "appmetrics": "^3.0.0", "elasticsearch": "13.3.1"
This work around no longer works apparently. Maybe apiVersion can't go back that far? Any ideas?
Getting Type error on fresh installation:
elasticsearch node module version installed with the library is 12.1.3 elasticsearch server version 5.1.1 node version v4.6.1