300Geeks / aws-elk-billing

Tools for Loading and Visualising AWS Detailed Billing with ELK(Elasticsearch, Logstash, Kibana)
MIT License
157 stars 26 forks source link

Can't make it work anymore #17

Closed johnnybraga closed 7 years ago

johnnybraga commented 7 years ago

I have build up a new box and setup for using aws-elk-billing but after get everything together ELK connections checking OK and then nothing is happening - It seems that after that checking step further steps aren't being executed. Any ideas? How could it be troubleshooted? Thanks in advance!

droidlabour commented 7 years ago

Can you post the logs, that will help to figure out better.

johnnybraga commented 7 years ago

@droidlabour, I don't see any further info on the console screen. Could you instruct me how to pull some logs? I appreciated

droidlabour commented 7 years ago

@johnnybraga Run docker-compose logs > logs.txt

johnnybraga commented 7 years ago

aws-elk-billing-2017-05-11T1755.txt

johnnybraga commented 7 years ago

@droidlabour, I have removed those docker images and start over again... this time I noticed the following error message:

Successfully installed boto3 botocore jmespath s3transfer docutils python-dateutil futures Cleaning up... ---> ad8a15cb966e Removing intermediate container 4001677537d1 Step 16/21 : RUN pip install pyelasticsearch ---> Running in 1c50395f3a95 Downloading/unpacking pyelasticsearch Running setup.py (path:/tmp/pip_build_root/pyelasticsearch/setup.py) egg_info for package pyelasticsearch

Downloading/unpacking certifi (from pyelasticsearch) Downloading/unpacking elasticsearch>=1.3.0,<2.0.0 (from pyelasticsearch) Downloading/unpacking urllib3>=1.8,<2.0 (from pyelasticsearch) Downloading/unpacking simplejson>=3.0 (from pyelasticsearch) Running setup.py (path:/tmp/pip_build_root/simplejson/setup.py) egg_info for package simplejson

Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0,<2.0 in /usr/lib/python2.7/dist-packages (from pyelasticsearch) Installing collected packages: pyelasticsearch, certifi, elasticsearch, urllib3, simplejson Running setup.py install for pyelasticsearch

Found existing installation: urllib3 1.7.1 Not uninstalling urllib3 at /usr/lib/python2.7/dist-packages, owned by OS Running setup.py install for simplejson building 'simplejson._speedups' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o simplejson/_speedups.c:2:20: fatal error: Python.h: No such file or directory

include "Python.h"

                    ^
compilation terminated.
***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
I'm retrying the build without the C extension now.
***************************************************************************

***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
***************************************************************************

Successfully installed pyelasticsearch certifi elasticsearch urllib3 simplejson Cleaning up... ---> 044caa791979 Removing intermediate container 1c50395f3a95 Step 17/21 : RUN pip install nose ---> Running in 7fda75f25838 Downloading/unpacking nose Installing collected packages: nose Successfully installed nose>

Do you think it's the issue? =) Thanks!

droidlabour commented 7 years ago

@johnnybraga It looks like it's taking time to download the billing reports. Make sure that the IAM credentials has access to the S3 bucket.

droidlabour commented 7 years ago

@johnnybraga Also make sure you're using the latest revision.

johnnybraga commented 7 years ago

@droidlabour, It looks like it stops on create template step, not even trying to access S3 - I have monitoring for network traffic. I noticed that elasticsearch image changed recently. Do you think it could be it? I tested the credentials using AWS CLI, everything works just fine.

droidlabour commented 7 years ago

@johnnybraga Can you send me the entire logs after you hit http://localhost:5601

johnnybraga commented 7 years ago

@droidlabour please find it below...

aws-elk-billing-2017-05-12.txt

johnnybraga commented 7 years ago

@droidlabour I replaced --XHEAD -i for --head on check template step and it worked! the process was getting hanged in there. After that it worked as planned. Thanks buddy!

droidlabour commented 7 years ago

@johnnybraga That's weird, Lemme test it on my side.

chitopunk commented 7 years ago

same here, it hangs on curl -XHEAD -i elasticsearch:9200/_template/aws_billing, same thing replaced -XHEAD -i with --head in tool/tools.py fixes the issue