Posts

Showing posts from February, 2021

[Solved] Restructuring the CDN Logs

Image
 Problem:- Cloudfront logs are stored in the following format distributionid-year-month-date-hour.gz So if you are looking to analyse these logs you need something similar to the Athena which can directly run your queries over the s3 bucket which is storing these logs. But Athena requires partition data which simply means storing data in a format of (e.g. a folder structure). This allows you to restrict the athena to the limited data which you want to analyze other by default it will take the entire data and cost you more while reading GBs of data which you dont want. By default Athena tries to "read all" the data. But if you have partitioned it like year/month/day than you can register it like year=2021/month=02/day=25 -- s3://logs/2021/02/25 This allows your to simply use the where clause and with partition indices to restrict the athena to read the data you are interested in SELECT uri, count(1) FROM cloudfront_logs WHERE status = 404 AND (year || ...

Understanding Docker compose with diagram

Image

[Solved] cannot load such file -- puppetserver/ca/cli (LoadError)

Issue:- When try to list the CA certificates in the puppet getting below error    [root@puppetmaster bin]# /opt/puppetlabs/bin/puppetserver ca list  Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2  Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2  Traceback (most recent call last):   2: from /opt/puppetlabs/server/apps/puppetserver/cli/apps/ca:3:in ` '   1: from /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'  /opt/puppetlabs/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- puppetserver/ca/cli (LoadError)  Resolution:- The above error comes when you are not using sudo command. Even if you are running via root than also you need to use the sudo command to resolve this issue   [root@puppetma...