When you say you have it configured, do you mean the “key” field?  I have found 
that you do not need to set that.  To send the output of Jenkins jobs to 
logstash, only set:

Jenkins -> Manage Jenkins -> Logstash
1. indexer type to ‘syslog’
2. hostname to logstash
3. port to $logstash_port

If you have a lot of output going to logstash, you might have json parse errors 
which would prevent proper indexing to elasticsearch.  Check the records in 
elasticsearch around the time that you would expect to see the Jenkins output 
as it might not be typed properly.  One way to troubleshoot this is to set the 
max lines from the job going to logstash to something small, like 5, and then 
check to see if you are sending data properly.  Also, be sure to use the post 
build action to send output to logstash.

Best,

Josh Miller
ITSA Consulting, LLC
skype:  itsecureadmin
https://itsecureadmin.com/

> On Mar 17, 2017, at 8:04 AM, iob <[email protected]> wrote:
> 
> yeah but what should I give to the jenkins' logstash-plugin. i have 
> configured as logstash-%{+YYYY.MM.dd}/jenkins now. Although i cant see 
> anything when I search for type:jenkins
> 
> On Friday, March 17, 2017 at 2:28:25 PM UTC, Josh Miller wrote:
> You would want to define the index in the output section of logstash.config, 
> i.e.:
> 
> output {
>     elasticsearch {
>         hosts => [“host"]
>         index => “logstash-logs-%{+YYYY.MM.dd}"
>     }   
> 
> }
> 
> 
> RE:  
> https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-index
>  
> <https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-index>
> 
> 
> HTH,
> 
> Josh Miller
> ITSA Consulting, LLC
> skype:  itsecureadmin
> https://itsecureadmin.com/ <https://itsecureadmin.com/>
>> On Mar 17, 2017, at 7:24 AM, iob <[email protected] <javascript:>> wrote:
>> 
>> i have set up a logstash-plugin to forward logs to elasticsearch. for now it 
>> works and i can see logs on logstash-jenkins index that
>> has been set in the plugin. What I want though is to sent to 
>> logstash-YY.mm.dd indices. i tried to set the "key" to logstash-* but doesnt 
>> seem to work. any idea?
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/354daa13-1875-46e0-8d76-b1dc9b5b0f85%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/354daa13-1875-46e0-8d76-b1dc9b5b0f85%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/c0c08e8f-4a70-4b2b-abe2-50544d033b59%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/c0c08e8f-4a70-4b2b-abe2-50544d033b59%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/EC657015-4812-4C77-A80D-7AEDC49E7816%40itsecureadmin.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to