Hello Folks,
I have an issue in kibana APM.
I am using Elastic Stack 6.2 in RHEL 7.
When i am running ./apm-server -e command then its giving me this error:
Exiting: error loading config file: stat apm-server.yml: no such file or directory
and this is my apm-server.yml file
############################# APM Server ######################################
apm-server:
Defines the host and port the server is listening on
host: "192.168.151.13:8200"
Please be aware that frontend support is an experimental feature at the moment!
frontend:
# To enable experimental frontend support set this to true.
enabled: false
Authorization token to be checked. If a token is set here the agents must
send their token in the following format: Authorization: Bearer
#secret_token:
#ssl.enabled: false
#ssl.certificate : "path/to/cert"
#ssl.key : "path/to/private_key"
#==================== Elasticsearch template setting ==========================
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
#============================== Dashboards =====================================
These settings control loading the sample dashboards to the Kibana index. Loading
the dashboards is disabled by default and can be enabled either by setting the
options here, or by using the -setup
CLI flag or the setup
command.
setup.dashboards.enabled: true
#============================== Kibana =====================================
Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
This requires a Kibana endpoint configuration.
setup.kibana:
Kibana Host
Scheme and port can be left out and will be set to the default (http and 5601)
In case you specify and additional path, the scheme is required: http://localhost:5601/path
IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "192.168.151.13:5601"
username: "elastic"
password: "elastic"
#================================ Outputs =====================================
Configure what output to use when sending the data collected by the beat.
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
Array of hosts to connect to.
hosts: ["192.168.151.13:9200"]
Optional protocol and basic auth credentials.
#protocol: "https"
username: "elastic"
password: "elastic"
#================================ Logging =====================================
Sets log level. The default log level is info.
Available log levels are: critical, error, warn, info, debug
#logging.level: debug
At debug level, you can selectively enable logging only for some components.
To enable all selectors use ["*"]. Examples of other selectors are "beat",
"publish", "service".
#logging.selectors: ["*"]
service is running fine.
one thing i don't know where i will write this code:
// Add this to the VERY top of the first file loaded in your application
var apm = require('elastic-apm-node').start({
// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
serviceName: '',
// Use if APM Server requires a token
secretToken: '',
// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: ''
})
Please guide me in right direction.
Thanks & Regards,
Krunal.