question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tag & hostname not working for AWS Elastic Beanstalk

See original GitHub issue

Hi,

I tried to add tags and change the hostname on AWS Elastic Beanstalk. In the logs I found Hostname: FSDEV saved to config. Tags: FSDEV has been saved to config.

It looks like it worked but I don’t see anything on the dashboard, does it take a long time to appear maybe?

Here is my config file:

files:
  "/home/ec2-user/logdna.sh" :
    mode: "000777"
    owner: root
    group: root
    content: |
      #!/bin/sh
      echo "[logdna]
      name=LogDNA packages
      baseurl=http://repo.logdna.com/el6/
      enabled=1
      gpgcheck=0" | tee /etc/yum.repos.d/logdna.repo
      yum -y install logdna-agent
      logdna-agent -k MYKEY # this is your unique Ingestion Key
      logdna-agent --hostname FSDEV
      logdna-agent -t FSDEV
      # /var/log is monitored/added by default (recursively), optionally add more dirs here
      logdna-agent -d /var/app/current/logs
      chkconfig logdna-agent on
      service logdna-agent start
commands:
  logdna:
    command: "/home/ec2-user/logdna.sh"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Jolg42commented, Dec 4, 2018

Posting a working example as a reference:

files:
  "/home/ec2-user/logdna.sh" :
    mode: "000777"
    owner: root
    group: root
    content: |
      #!/bin/sh
      rpm --import https://repo.logdna.com/logdna.gpg
      echo "[logdna]
      name=LogDNA packages
      baseurl=https://repo.logdna.com/el6/
      enabled=1
      gpgcheck=1
      gpgkey=https://repo.logdna.com/logdna.gpg" | sudo tee /etc/yum.repos.d/logdna.repo
      yum -y install logdna-agent
      logdna-agent -k INSERT_KEY_HERE # this is your unique Ingestion Key
      # /var/log is monitored/added by default (recursively), optionally add more dirs here
      # logdna-agent -d /var/app/current/logs
      # --hostname allows you to pass your env hostname/appname to LogDNA
      logdna-agent --hostname `{"Ref": "AWSEBEnvironmentName" }`
      # -t option allows you to tag the host with tags
      logdna-agent -t CUSTOMTAG
      chkconfig logdna-agent on
      service logdna-agent start
commands:
  01_install_logdna:
    command: "/home/ec2-user/logdna.sh"
  02_restart_logdna:
    command: "service logdna-agent restart"
1reaction
smusalicommented, Dec 4, 2018

@Jolg42,

As I got informed, all is working well now; so, closing this issue!

Happy Logging!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS SSL Beanstalk Hostname not matching - Stack Overflow
In that hosted zone I created a record (api.sub.mydomain.at) pointing to the Elastic Load Balancer. Everything works fine, API is callable.
Read more >
Change the hostname of your Amazon Linux instance
Set the hostname for your Amazon Linux instance using a dynamic DNS provider.
Read more >
Setting configuration options during environment creation
Set options during AWS Elastic Beanstalk environment creation with options files, the Elastic Beanstalk console, or command line options.
Read more >
Your Elastic Beanstalk environment's Domain name
When you create an environment, you can choose a hostname for your application. The subdomain and domain are autopopulated to region .elasticbeanstalk.com ....
Read more >
The create new environment wizard - AWS Elastic Beanstalk
Set the environment's name and subdomain, and create a description for your environment. Be aware that these environment settings cannot change after the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found