This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
centralised-logging.txt
854 lines (728 loc) · 24.8 KB
/
centralised-logging.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
= Installing the Centralised Logging Suite
== Installing the Centralised Log Relay/Transformer
Locate a bare metal system that meets the following minimum specifications
* 8GB of Memory
* Single Socket Xeon Class CPU
* 500GB of Disk Space
Do a fresh CentOS 7 basic install onto the machine. The required repositories
are enabled by
yum install centos-release-opstools
Please note, the repositories for elasticsearch and for kibana need to be
enabled manually from their upstream provider.
Kibana is a web application so it can be used directly to port 5601, or using the apache http server as a proxy. We suggest to use the apache http server as a
proxy to kibana, for several reasons (it is easier to have the port 80 open on the firewalls, the apache http server can be configured to use authentication, a
https can be used...).
First thing we will need to open the firewall on the machine to allow connections to fluentd and apache
firewall-cmd --zone=public --add-port=4000/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
.To use kibana directly
[NOTE]
firewall-cmd --zone=public --add-port=5601/tcp --permanent
firewall-cmd --reload
Once that is done, install the fluentd and elasticsearch software with the following commands
yum install -y elasticsearch fluentd rubygem-fluent-plugin-elasticsearch kibana httpd
Now we will configure elasticsearch. To do this edit the file /etc/elasticsearch/elasticsearch.yml and add the following lines to the end of the file
http.cors.enabled: true
http.cors.allow-origin: "/.*/"
Now start the elasticsearch instance and enable it at boot
systemctl start elasticsearch
systemctl enable elasticsearch
To confirm the elasticsearch instance is working, run the following curl command and confirm it returns a valid response similar to below
curl http://localhost:9200/
This should give the response
{
"status" : 200,
"name" : "elasticsearch.example.com",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.5.2",
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
"build_timestamp" : "2015-02-19T13:05:36Z",
"build_snapshot" : false,
"lucene_version" : "4.10.3"
},
"tagline" : "You Know, for Search"
}
Once this is done, we now need to configure fluentd to accept log data and write it to elasticsearch. Edit the file /etc/fluentd/fluent.conf and make it have the just the following content
# In v1 configuration, type and id are @ prefix parameters.
# @type and @id are recommended. type and id are still available for backward compatibility
<source>
@type forward
port 4000
bind 0.0.0.0
</source>
#This must be placed at the end of the file as it will process everything
<match **>
@type elasticsearch
host localhost
port 9200
logstash_format true
flush_interval 5
</match>
Now start fluentd and enable it at boot
systemctl start fluentd
systemctl enable fluentd
Check the journal for fluentd and ensure it has no errors at start
journalctl -u fluentd -l -f
.Configure apache http server as a proxy
[NOTE]
===============================
Create the file /etc/httpd/conf.d/kibana.conf and place the following content inside
Listen 80
<VirtualHost *:80>
RewriteEngine On
ProxyRequests Off
RewriteRule /kibana(.*) http://localhost:5601$1 [P]
<Location /kibana>
ProxyPassReverse http://localhost:5601/
</Location>
</VirtualHost>
Apache http server needs to enable the network connection, start the service and enable it at boot
setsebool -P httpd_can_network_connect 1
systemctl start httpd
systemctl enable httpd
===============================
== Installing the log collection agent on all nodes
To collect the logs from all machines in the OpenStack environment and send
them to your centralised logging server, you will need to make sure the
following channel is enabled in Subscription Manager/Satellite on all machines
rhel-7-server-openstack-7.0-optools-rpms
Once this is done, you will need to install the following packages on all
OpenStack machines
yum install -y fluentd rubygem-fluent-plugin-add
Now you will need to configure the fluent user on all nodes so it has
permissions to read all the OpenStack log files. Do this by running the
following command
for user in {keystone,nova,neutron,cinder,glance,heat,ceilometer,sahara,ironic}; do usermod -a -G $user fluentd; done
Note that you may get an error on some nodes about missing groups. This is
ok as not all nodes run all services.
Some of the /var/log/{keystone,nova,neutron,cinder,glance,heat,ceilometer,sahara,ironic} directories do not have the proper group so:
for dir in {keystone,nova,neutron,cinder,glance,heat,ceilometer,sahara,ironic}; do chown $dir:$dir /var/log/$dir; done
Next you will need to configure fluentd on all the machines. Make sure the
file /etc/fluentd/fluent.conf on all machines looks like the following (be
sure to replace $FQDN_OF_LOGGING_SERVER with the dns name or IP of your
centralised logging server configued above)
# In v1 configuration, type and id are @ prefix parameters.
# @type and @id are recommended. type and id are still available for backward compatibility
# Nova compute
<source>
@type tail
path /var/log/nova/nova-compute.log
tag nova.compute
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>[^\]]*)\] (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.compute>
type add
<pair>
service nova.compute
hostname "#{Socket.gethostname}"
</pair>
</match>
# Nova API
<source>
@type tail
path /var/log/nova/nova-api.log
tag nova.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) \[(?<context>[^\]]*)\] (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.api>
type add
<pair>
service nova.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Nova Cert
<source>
@type tail
path /var/log/nova/nova-cert.log
tag nova.cert
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.cert>
type add
<pair>
service nova.cert
hostname "#{Socket.gethostname}"
</pair>
</match>
# Nova Conductor
<source>
@type tail
path /var/log/nova/nova-conductor.log
tag nova.conductor
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.conductor>
type add
<pair>
service nova.conductor
hostname "#{Socket.gethostname}"
</pair>
</match>
# Nova Consoleauth
<source>
@type tail
path /var/log/nova/nova-consoleauth.log
tag nova.consoleauth
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.consoleauth>
type add
<pair>
service nova.consoleauth
hostname "#{Socket.gethostname}"
</pair>
</match>
# Nova Scheduler
<source>
@type tail
path /var/log/nova/nova-scheduler.log
tag nova.scheduler
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match nova.scheduler>
type add
<pair>
service nova.scheduler
hostname "#{Socket.gethostname}"
</pair>
</match>
# Neutron Openvswitch Agent
<source>
@type tail
path /var/log/neutron/openvswitch-agent.log
tag neutron.openvswitch
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match neutron.openvswitch>
type add
<pair>
service neutron.openvswitch
hostname "#{Socket.gethostname}"
</pair>
</match>
# Neutron Server
<source>
@type tail
path /var/log/neutron/server.log
tag neutron.server
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match neutron.server>
type add
<pair>
service neutron.server
hostname "#{Socket.gethostname}"
</pair>
</match>
# Neutron DHCP Agent
<source>
@type tail
path /var/log/neutron/dhcp-agent.log
tag neutron.dhcp
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match neutron.dhcp>
type add
<pair>
service neutron.dhcp
hostname "#{Socket.gethostname}"
</pair>
</match>
# Neutron L3 Agent
<source>
@type tail
path /var/log/neutron/l3-agent.log
tag neutron.l3
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match neutron.l3>
type add
<pair>
service neutron.l3
hostname "#{Socket.gethostname}"
</pair>
</match>
# Neutron Metadata Agent
<source>
@type tail
path /var/log/neutron/metadata-agent.log
tag neutron.metadata
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match neutron.metadata>
type add
<pair>
service neutron.metadata
hostname "#{Socket.gethostname}"
</pair>
</match>
# Keystone
<source>
@type tail
path /var/log/keystone/keystone.log
tag keystone
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match keystone>
type add
<pair>
service keystone
hostname "#{Socket.gethostname}"
</pair>
</match>
# Glance API
<source>
@type tail
path /var/log/glance/api.log
tag glance.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match glance.api>
type add
<pair>
service glance.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Glance Registry
<source>
@type tail
path /var/log/glance/registry.log
tag glance.registry
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match glance.registry>
type add
<pair>
service glance.registry
hostname "#{Socket.gethostname}"
</pair>
</match>
# Cinder API
<source>
@type tail
path /var/log/cinder/api.log
tag cinder.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match cinder.api>
type add
<pair>
service cinder.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Cinder Scheduler
<source>
@type tail
path /var/log/cinder/scheduler.log
tag cinder.scheduler
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match cinder.scheduler>
type add
<pair>
service cinder.scheduler
hostname "#{Socket.gethostname}"
</pair>
</match>
# Cinder Volume
<source>
@type tail
path /var/log/cinder/volume.log
tag cinder.volume
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match cinder.volume>
type add
<pair>
service cinder.volume
hostname "#{Socket.gethostname}"
</pair>
</match>
# Cinder Backup
<source>
@type tail
path /var/log/cinder/backup.log
tag cinder.backup
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match cinder.backup>
type add
<pair>
service cinder.backup
hostname "#{Socket.gethostname}"
</pair>
</match>
# Heat API CloudFormation
<source>
@type tail
path /var/log/heat/heat-api-cfn.log
tag heat.api.cfn
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match heat.api.cfn>
type add
<pair>
service heat.api.cfn
hostname "#{Socket.gethostname}"
</pair>
</match>
# Heat API CloudWatch
<source>
@type tail
path /var/log/heat/heat-api-cloudwatch.log
tag heat.api.cloudwatch
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match heat.api.cloudwatch>
type add
<pair>
service heat.api.cloudwatch
hostname "#{Socket.gethostname}"
</pair>
</match>
# Heat API
<source>
@type tail
path /var/log/heat/heat-api.log
tag heat.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match heat.api>
type add
<pair>
service heat.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Heat Engine
<source>
@type tail
path /var/log/heat/heat-engine.log
tag heat.engine
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match heat.engine>
type add
<pair>
service heat.engine
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Agent Notification
<source>
@type tail
path /var/log/ceilometer/agent-notification.log
tag ceilometer.agent.notification
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.agent.notification>
type add
<pair>
service ceilometer.agent.notification
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Alarm Evaluator
<source>
@type tail
path /var/log/ceilometer/alarm-evaluator.log
tag ceilometer.alarm.evaluator
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.alarm.evaluator>
type add
<pair>
service ceilometer.alarm.evaluator
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Alarm Notifier
<source>
@type tail
path /var/log/ceilometer/alarm-notifier.log
tag ceilometer.alarm.notifier
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.alarm.notifier>
type add
<pair>
service ceilometer.alarm.notifier
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer API
<source>
@type tail
path /var/log/ceilometer/api.log
tag ceilometer.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.api>
type add
<pair>
service ceilometer.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer DB Sync
<source>
@type tail
path /var/log/ceilometer/ceilometer-dbsync.log
tag ceilometer.dbsync
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.dbsync>
type add
<pair>
service ceilometer.dbsync
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Central
<source>
@type tail
path /var/log/ceilometer/central.log
tag ceilometer.central
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.central>
type add
<pair>
service ceilometer.central
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Collector
<source>
@type tail
path /var/log/ceilometer/collector.log
tag ceilometer.collector
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.collector>
type add
<pair>
service ceilometer.collector
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ceilometer Compute
<source>
@type tail
path /var/log/ceilometer/compute.log
tag ceilometer.compute
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ceilometer.compute>
type add
<pair>
service ceilometer.compute
hostname "#{Socket.gethostname}"
</pair>
</match>
# Sahara All
<source>
@type tail
path /var/log/sahara/sahara-all.log
tag sahara.all
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match sahara.all>
type add
<pair>
service sahara.all
hostname "#{Socket.gethostname}"
</pair>
</match>
# Trove API
<source>
@type tail
path /var/log/trove/trove-api.log
tag trove.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match trove.api>
type add
<pair>
service trove.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Trove Conductor
<source>
@type tail
path /var/log/trove/trove-conductor.log
tag trove.conductor
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match trove.conductor>
type add
<pair>
service trove.conductor
hostname "#{Socket.gethostname}"
</pair>
</match>
# Trove Task Manager
<source>
@type tail
path /var/log/trove/trove-taskmanager.log
tag trove.taskmanager
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match trove.taskmanager>
type add
<pair>
service trove.taskmanager
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ironic API
<source>
@type tail
path /var/log/ironic/ironic-api.log
tag ironic.api
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ironic.api>
type add
<pair>
service ironic.api
hostname "#{Socket.gethostname}"
</pair>
</match>
# Ironic Conductor
<source>
@type tail
path /var/log/ironic/ironic-conductor.log
tag ironic.conductor
format multiline
format_firstline /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
format /(?<time>[^ ]* [^ ]*) (?<pid>[^ ]*) (?<loglevel>[^ ]*) (?<class>[^ ]*) (\[(?<context>[^\]]*)\])? (?<message>.*)/
time_format %F %T.%L
</source>
<match ironic.conductor>
type add
<pair>
service ironic.conductor
hostname "#{Socket.gethostname}"
</pair>
</match>
<match greped.**>
@type forward
heartbeat_type tcp
<server>
name $FQDN_OF_LOGGING_SERVER
host $FQDN_OF_LOGGING_SERVER
port 4000
</server>
</match>
Now that fluentd is configured, we can start the fluentd service and enable it at boot
systemctl start fluentd
systemctl enable fluentd
You should be able to now go to kibana running on your centralised logging server and see logs start to populate
http://$FQDN_OF_LOGGING_SERVER/