Code Monkey home page Code Monkey logo

rtf-usage-script's Introduction

rtf-usage-script

Script to output current RTF usage data in JSON format.

Automatically ignores monitoring containers and RTF system pods.

The output is intended to be consumed by a downstream application such as Splunk or Elastic for generating usage data charts.

This script may also be used with self-managed RTF by running on your local workstation or support bastion node, with kubectl and jq installed and your KUBE_CONFIG set appropriately.

Usage

  • Copy rtf-node-info.sh onto a controller node in your fabric.
  • Ensure the execute bit is set: chmod u+x rtf-node-info.sh.
  • Log into planet: sudo gravity enter
  • Run ./rtf-node-info.sh to generate the output.
  • A file named nodeinfo_<timestamp>.json will be created with the current usage data.

Requirements

jq [https://stedolan.github.io/jq] must be installed on the host for the script to execute.

Output

Field Description
Name Name of the application pod
Application Name of the MuleSoft application
Business Group ID Anypoint business group ID
Environment ID Anypoint Environment ID
Status Pod status
Started time Pod started or deployment time
CPU millis vCPU millicores consumed by the Mule application
Memory MB MB of memory consumed by the Mule application
Worker node IP Primary public IP of the worker node

Example output:

[
  {
    "name": "my-api-euw1-84d499bb57-gzp9t",
    "application": "my-api-euw1",
    "business_group_id": "d4b1562c-aa0c-48b7-9389-be44c58fddd7",
    "environment_id": "55eae73b-b9b5-4adf-a410-29b6d5920112",
    "status": "Running",
    "started_time": "2021-02-23T15:40:55Z",
    "cpu_millis": 500,
    "memory_mb": 1000,
    "worker_node_ip": "172.31.30.156"
  },
  {
    "name": "my-api-euw2-7bd8cc485f-v5d4p",
    "application": "my-api-euw2",
    "business_group_id": "d4b1562c-aa0c-48b7-9389-be44c58fddd7",
    "environment_id": "55eae73b-b9b5-4adf-a410-29b6d5920112",
    "status": "Running",
    "started_time": "2021-02-23T15:41:42Z",
    "cpu_millis": 500,
    "memory_mb": 1000,
    "worker_node_ip": "172.31.45.3"
  }
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.