{"id":27996584,"url":"https://github.com/runtimetools/appmetrics-kafka","last_synced_at":"2025-10-05T00:36:48.648Z","repository":{"id":81457928,"uuid":"53127451","full_name":"RuntimeTools/appmetrics-kafka","owner":"RuntimeTools","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-21T15:23:47.000Z","size":14,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-08T21:47:40.185Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RuntimeTools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-04T10:25:10.000Z","updated_at":"2019-06-21T15:23:49.000Z","dependencies_parsed_at":"2023-03-09T06:30:33.612Z","dependency_job_id":null,"html_url":"https://github.com/RuntimeTools/appmetrics-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RuntimeTools/appmetrics-kafka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuntimeTools%2Fappmetrics-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuntimeTools%2Fappmetrics-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuntimeTools%2Fappmetrics-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuntimeTools%2Fappmetrics-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RuntimeTools","download_url":"https://codeload.github.com/RuntimeTools/appmetrics-kafka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RuntimeTools%2Fappmetrics-kafka/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266204534,"owners_count":23892364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-08T21:46:37.527Z","updated_at":"2025-09-17T20:09:00.191Z","avatar_url":"https://github.com/RuntimeTools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Kafka Connector for Node Application Metrics\n\nA connector that collects data using 'appmetrics' and sends it to a configured Kafka server using 'kafka-node'.\n\n## Getting Started\n\n### Installation\nThe Kafka Connector for Node Application Metrics can be installed via `npm`:\n```sh\n$ npm install appmetrics-kafka\n```\n\n### Configuring the Kafka Connector for Node Application Metrics \n\nThe connector can be used in your application by requiring it as the first line of your application:\n```sh\nvar appkafka = require('appmetrics-kafka').Kafka();\n```\nConfiguration of the connection to the Kafka server is possible by passing parameters to the `Kafka()` function. These are passed directly though to the `Client` constructor in the `kafka-node` module. Information for that module is available here:\nhttps://www.npmjs.com/package/kafka-node\n\nAdditional data may also be sent to Kafka using the standard `kafka-node` module APIs, eg.\n\n```sh\nvar appkafka = require('appmetrics-kafka').Kafka();\n\nvar Producer = appkafka.Producer,\n    KeyedMessage = appkafka.KeyedMessage,\n    client = new appkafka.Client(),\n    producer = new Producer(client),\n    km = new KeyedMessage('key', 'message'),\n    payloads = [\n        { topic: 'topic1', messages: 'hi', partition: 0 },\n        { topic: 'topic2', messages: ['hello', 'world', km] }\n    ];\n\tproducer.on('ready', function () {\n\t    producer.send(payloads, function (err, data) {\n\t    \tconsole.log(err);\n\t        console.log(data);\n\t    });\n\t});\n\t \n\tproducer.on('error', function (err) {})\n```\n\n### Data Provided\n\nThe connector sends the following topics to Kafka from Node Application Metrics:\n\n\n#### CPU\n\n* `cpu.process` the CPU usage of the application as a percentage of total machine CPU\n* `cpu.system` the CPU usage of the system as a percentage of total machine CPU\n\n#### System Memory\n\n* `memory.process.private` the amount of memory used by the Node.js application that cannot be shared with other processes, in bytes.\n* `memory.process.physical` the amount of RAM used by the Node.js application in bytes.\n* `memory.process.virtual` the memory address space used by Node.js application in bytes.\n* `memory.system.used` the total amount of RAM in use on the system in bytes.\n* `memory.system.total` the total amount of RAM available on the system in bytes.\n\n#### Event Loop\n\n* `eventloop.latency.min` the shortest sampled latency for processing an event\n* `eventloop.latency.max` the longest sampled latency for processing an event\n* `eventloop.latency.avg` the mean sampled latency for processing an event\n\n#### Garbage Collection\n\n* `gc.size` the size of the JavaScript heap in bytes.\n* `gc.used` the amount of memory used on the JavaScript heap in bytes.\n* `gc.duration` the duration of the GC cycle in milliseconds.\n\n#### HTTP Requests\n* `http.method` the HTTP method used for the request\n* `http.url` the URL on which the request was made.\n* `http.duration` the time taken for the HTTP request to be responded to in ms.\n\n#### Socket.io\n\n* `socketio.method` whether the event is a 'broadcast' or 'emit' from the application, or a 'receive' from a client .\n* `socketio.event` the name used for the event.\n* `socketio.duration` the time taken for a received named socketio event to be handled.\n\n#### MySQL Queries\n\n* `mysql.query` the query made of the MySQL database.\n* `mysql.duration` the time taken for the given MySQL query to be responded to in ms.\n\n#### MongoDB Queries\n\n* `mongo.query`  the query made of the MongoDB database.\n* `mongo.duration` the time taken for the given MongoDB query to be responded to in ms.\n\n#### MQTT Messaging\n\n* `mqtt.method` the name of the call or event (will be one of 'publish' or 'message').\n* `mqtt.topic`  the topic on which a message is sent/received.\n* `mqtt.qos` the QoS level for a 'send' call, undefined if not set.\n* `mqtt.duration`  the time taken in milliseconds.\n\n#### Leveldown Queries\n\n* `levedown.method` the leveldown method being used.\n* `leveldown.key` the key being used for a call to get, put or del (Undefined for other methods).\n* `leveldown.value` the value being added to the LevelDB database using the put method (Undefined for other methods).\n* `leveldown.opCount` the number of operations carried out by a batch method (Undefined for other methods).\n* `leveldown.duration` the time taken for the LevelDB query to be responded to in ms.\n\n#### Redis Queries\n\n\n* `redis.cmd` the Redis command sent to the server or 'batch.exec'/'multi.exec' for groups of command sent using batch/multi calls.\n* `redis.duration` the time taken for the given Redis command to be responded to in ms.\n\n#### Memcached Operations\n\n* `memcached.method`  the method used in the memcached client, eg set, get, append, delete, etc.\n* `memcached.key` the key associated with the data.\n* `memcached.duration` the time taken for the given Memcached method to be responded to in ms.\n\n#### OracleDB Queries\n* `oracledb.query`  the query made of the OracleDB database.\n* `oracledb.duration` the time taken for the OracleDB query to be responded to in ms.\n\n#### Oracle Queries\n* `oracle.query`  the query made of the Oracle database.\n* `oracle.duration` the time taken for the Oracle query to be responded to in ms.\n* \n#### Strong Oracle Queries\n* `strongoracle.query`  the query made of the Oracle database.\n* `strongoracle.duration` the time taken for the Strong Oracle query to be responded to in ms.\n\n#### PostgreSQL Queries\n* `postgres.query` the query made of the PostgreSQL database.\n* `postgres.duration` the time taken for the given PostgresSQL query to be responded to in ms.\n\n#### MQLight Messaging\n\n* `mqlight.clientid` the id of the client.\n* `mqlight.data` the data sent if a 'send' or 'message', undefined for other calls. Truncated if longer than 25 characters.\n* `mqlight.method` the name of the call or event (will be one of 'send' or 'message').\n* `mqlight.topic` the topic on which a message is sent/received.\n* `mqlight.qos` the QoS level for a 'send' call, undefined if not set.\n* `mqlight.duration`  the time taken for a MQLight message to handled on a given topic in ms.\n\n### License\nThe Node Application Metrics to Kafka Connector is licensed using an Apache v2.0 License.\n\n### Version\n2.0.0\n\n#### Version History\n2.0.0 update appmetrics version\n\n1.0.0 Initial release  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruntimetools%2Fappmetrics-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruntimetools%2Fappmetrics-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruntimetools%2Fappmetrics-kafka/lists"}