Logstash HTTP_Poller input plugin not sending output to Elasticsearch


(VIJAYA K PEDDAREDDY) #1

Hello,

I'm trying to log IBM Liberty server's metrics to Elasticsearch for dashboard purposes.

Here's my logstash config file:

input {
	http_poller {		
		urls => {			
			"service1" => "https://dc2-svzsys01.xxxx.com:11101/IBMJMXConnectorREST"
			"service2" => "https://dc2-svzsys01:11101/IBMJMXConnectorREST/mbeans"			
			"service3" => "https://dc2-svzsys01.xxxxx.com:11101/IBMJMXConnectorREST/mbeanCount"
		}
		truststore => "/opt/data/conf/downloaded_truststore.jks"
		truststore_password => "******"    
		codec => "json"
		request_timeout => 8
		schedule => { "every" => "3s" }    	
		metadata_target => http_poller_metadata
		tags => jmx_endpoints
	}
}

filter {	
        json {
		source => "message"
	}
        
	if [http_request_failure] or [http_poller_metadata][code] != 200 {		
		mutate {
			add_tag => "bad_request"
		}
	}
       
        if [http_poller_metadata][code] == 200 {		
		mutate {
			add_tag => "good_request"
		}
	}
}

output {	
	elasticsearch {		
		hosts => ["10.19.28.21:9200"]
		index => "g2-jmx-metrics-%{+YYYY.MM.dd}"		
	}

        file {
		path => "/opt/logs/logstash-5.1.2/g2-jmx-metrics-%{+YYYY.MM.dd}.txt"
	}
	
	stdout {
		codec => rubydebug
	}
}

I see logs in Kibana only if I shutdown that specific server or if there's any issue with the URL. Otherwise, I don't even see the INDEX getting created.

http_poller_metadata.request.url   https://dc2-svzsys01.xxx.com:11101/IBMJMXConnectorREST

message	              Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /IBMJMXConnectorREST

tags	   	                     _jsonparsefailure, jmx_endpoints, bad_request

Fie Output plugin creating files at given location only if there's error. Otherwise nothing.

For instance, If I hit this URL (https://dc2-svzsys01:11101/IBMJMXConnectorREST/mbeans) in any browser, output looks like this:

// 20170921154215
// https://dc2-svzdev01.ulinedm.com:11101/IBMJMXConnectorREST

{
  "version": "6",
  "mbeans": "/IBMJMXConnectorREST/mbeans",
  "createMBean": "/IBMJMXConnectorREST/mbeans/factory",
  "mbeanCount": "/IBMJMXConnectorREST/mbeanCount",
  "defaultDomain": "/IBMJMXConnectorREST/defaultDomain",
  "domains": "/IBMJMXConnectorREST/domains",
  "notifications": "/IBMJMXConnectorREST/notifications",
  "instanceOf": "/IBMJMXConnectorREST/instanceOf",
  "fileTransfer": "/IBMJMXConnectorREST/file",
  "api": "/IBMJMXConnectorREST/api",
  "graph": "/IBMJMXConnectorREST/graph"
}

Please help me if there's anything wrong with configuration or is there anything else I'm missing.

I really appreciate your help as I don't have a clue what's the issue with my configuration.

Thank you
Vj.


(VIJAYA K PEDDAREDDY) #2

Hi @magnusbaeck can you please help me with the issue I explained above ?


(VIJAYA K PEDDAREDDY) #3

Hi, Can any one in this forum please help fixing this issue ?


(VIJAYA K PEDDAREDDY) #4

Hi @magnusbaeck do you mind to help solve this issue please ?


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.