🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Datadog Tutorials: Send log to Datadog using api through telnet and curl

Reference – https://docs.datadoghq.com/api/latest/logs/

Step 1 – How to get API of Datadog Agent?

Step 2 – Go to Linux Cmd and run following commands.

Using Telnet


$ telnet intake.logs.datadoghq.com 10514
4396f0b432e47383f3dddddd3b1b7 Hell0 Everyone, this is Rajesh

4396f0b432e473ddddddb45cc3b1b7 Hell0 Everyone, this is Rajesh1

4396f0b432e47ddddd17b45cc3b1b7 Hell0 Everyone, this is Rajesh3

87b9dbcda7e5d069cd30a0f68154cca27 {"message":"Welcome to Datadog Session by DevOpsSchool - 1", "ddtags":"env:dev", "ddsource":"devopsschool-1", "hostname":"gs-hostame", "service":"user"}

87b9dbcda7ed5069cd30a0f68154cca27 {"message":"Welcome to Datadog Session by DevOpsSchool - 2", "ddtags":"env:prod", "ddsource":"devopsschool-2", "hostname":"gs-hostame", "service":"user"}

87b9dbcda7ed5069cd30a0f68154cca27 {"message":"Welcome to Datadog Session by DevOpsSchool - 3", "ddtags":"env:qa", "ddsource":"devopsschool-3", "hostname":"gs-hostame", "service":"user"}

87b9dbcda7de5069cd30a0f68154cca27 {"message":"Welcome to Datadog Session by DevOpsSchool - 4", "ddtags":"env:us", "ddsource":"devopsschool-3", "hostname":"gs-hostame", "service":"user"}

Using curl


curl -X POST "https://http-intake.logs.datadoghq.com/api/v2/logs" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: 87b9dbcda7e5069cd30a4468154cca27" \
-d @- << EOF
[
  {
    "ddsource": "nginx",
    "ddtags": "env:staging,version:5.1",
    "hostname": "i-012345678",
    "message": "2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World",
    "service": "payment"
  }
]
EOF

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x