MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

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

TCP log collection isย not supported from 2026

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

Step 1 – How to get API of Datadog Agent?

Datadog Organization Settings API Keys page, with numbered steps to find the API key

Datadog API Key dialog with the Copy button highlighted

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

Using Telnet


Telnet session to intake.logs.datadoghq.com 10514 sending API key-prefixed text and JSON log messages
Terminal running telnet to intake.logs.datadoghq.com port 10514, sending API key and Hello Everyone log lines
$ 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"}Code language: JavaScript (javascript)
Datadog Logs explorer showing three Hello Everyone, this is Rajesh logs received via telnet

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
Code language: JavaScript (javascript)

Datadog Logs explorer showing the Hello World payment service log sent with curl

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Datadog Tutorials: Tag Specifications

In a Datadog Agent log collection config, the tags field adds key:value tags to every log line the Agent collects from a source. You can then filter,…

Read More

Datadog Troubleshooting Master Guide

It covers: Datadog Agent, Kubernetes Agent, Cluster Agent, integrations, logs, APM/traces, custom metrics, DogStatsD, OpenTelemetry, API keys, Terraform, monitors, SLOs, RUM, Synthetics, cloud integrations, cost, permissions, and…

Read More

Datadog FAQ / Interview Questions and Answers โ€” 50 Questions

Below is a Datadog theoretical / approach / capability FAQ set โ€” not MCQ style. These are the kinds of questions that usually come in interviews, internal…

Read More

What is Datadog: Observability, Monitoring, SIEM, AIOps, Security, and DevOps Platform

Datadog is a SaaS-based observability, monitoring, security, and service-management platform used by DevOps, SRE, platform, application, security, and business teams to understand the health, performance, reliability, cost,…

Read More

What is Datadog and use cases of Datadog?

What is Datadog? Datadog is a cloud-based monitoring and analytics platform that provides full-stack observability for dynamic and cloud-native environments. It allows organizations to collect, correlate, and…

Read More

Datadog Tutorials: Log Collection & configuration using Datadog Agent

How to enable Log collection in Datadog? To enable log collection with an Agent running on your host, change logs_enabled: false to logs_enabled: true in the Agentโ€™s…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x