Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chandra-goka's full-sized avatar
🌍

CHANDRA SHEKHAR GOKA chandra-goka

🌍
View GitHub Profile
package com.otp;
import java.util.*;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.*;
public class SQS_Example {
public static void main(String[] args) {
#!/usr/bin/env bash
function get_datadog_status() {
if command -v systemctl &>/dev/null; then
agent_status=$(systemctl status datadog-agent.service 2>/dev/null)
if [ $? -ne 0 ]; then
echo "Datadog agent not installed"
return 1
fi
agent_health=$(echo "$agent_status" | awk '/Active:/ {print $2}')
#!/usr/bin/env bash
# Error codes
AGENT_NOT_INSTALLED=101
AGENT_NOT_ACTIVE=102
function get_datadog_status() {
if command -v systemctl &>/dev/null; then
agent_status=$(systemctl status datadog-agent.service 2>/dev/null)
if [ $? -ne 0 ]; then