Hello,
I have installed heartbeat on one of the host to monitor two URL's but it doesn't seems to work correctly to monitor one of that URL. Attaching heartbeat logs
2017-08-28T11:09:59-04:00 DBG Job 'http@http://X.X.X.X:8080/login' returned at 2017-08-28 11:09:59.430362951 -0400 EDT (cont=0).
2017-08-28T11:09:59-04:00 DBG Next wakeup time: 2017-08-28 11:10:09.41972809 -0400 EDT
2017-08-28T11:09:59-04:00 DBG Publish: {
"@timestamp": "2017-08-28T15:09:59.420Z",
"beat": {
"hostname": "jenkins",
"name": "jenkins",
"version": "5.5.2"
},
"duration": {
"us": 34401
},
"http_rtt": {
"us": 33923
},
"ip": "X.X.X.X",
"monitor": "http@http://X.X.X.X:8081/login/login.htm",
"port": 8081,
"response": {
"status": 200
},
"rtt": {
"us": 34323
},
"scheme": "http",
"tcp_connect_rtt": {
"us": 202
},
"type": "http",
"up": true,
"url": "http://X.X.X.X:8081/login/login.htm"
}
2017-08-28T11:09:59-04:00 DBG Job 'http@http://X.X.X.X:8081/login/login.htm' returned at 2017-08-28 11:09:59.454686381 -0400 EDT (cont=0).
2017-08-28T11:09:59-04:00 DBG Next wakeup time: 2017-08-28 11:10:09.41972809 -0400 EDT
2017-08-28T11:10:00-04:00 DBG output worker: publish 2 events
2017-08-28T11:10:00-04:00 DBG Try to publish 2 events to logstash with window size 10
2017-08-28T11:10:00-04:00 DBG 2 events out of 2 events sent to logstash. Continue sending
2017-08-28T11:10:00-04:00 DBG send completed
2017-08-28T11:10:09-04:00 DBG Start job 'http@http://X.X.X.X:8081/login/login.htm' at 2017-08-28 11:10:09.419933706 -0400 EDT.
2017-08-28T11:10:09-04:00 DBG Start job 'http@http://X.X.X.X:8080/login' at 2017-08-28 11:10:09.420049433 -0400 EDT.
2017-08-28T11:10:09-04:00 DBG Next wakeup time: 2017-08-28 11:10:19.41972809 -0400 EDT
2017-08-28T11:10:09-04:00 DBG Publish: {
"@timestamp": "2017-08-28T15:10:09.420Z",
"beat": {
"hostname": "jenkins",
"name": "jenkins",
"version": "5.5.2"
},
"duration": {
"us": 3575
},
"http_rtt": {
"us": 2908
},
"ip": "X.X.X.X",
"monitor": "http@http://X.X.X.X:8080/login",
"port": 8080,
"response": {
"status": 200
},
"rtt": {
"us": 3227
},
"scheme": "http",
"tcp_connect_rtt": {
"us": 156
},
"type": "http",
"up": true,
"url": "http://X.X.X.X:8080/login"
}
Config -
# Configure monitors
heartbeat.monitors:
- type: http
# List or urls to query
urls: ["http://10.152.58.27:8080/login", "http://10.152.58.27:8081/login/login.htm"]
# Configure task schedule
schedule: '@every 10s'
# Total test connection and data exchange timeout
#timeout: 16s
#================================ General =====================================
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:
# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]
# Optional fields that you can specify to add additional information to the
# output.
#fields:
env: development
#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["X.X.X.X:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
ssl.certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
#================================ Logging =====================================
# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
logging.level: debug
logging.to_files: true
logging.to_syslog: false
logging.files:
path: /var/log/heartbeat
name: heartbeat.log
keepfiles: 7
# 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: ["*"]
It publishes events only for http://X.X.X.X:8081