Datasophon1.2.1集成Dinky1.0.1

Dinky 下载地址: https://github.com/DataLinkDC/dinky/releases/tag/v1.0.1

Dinky 官网:https://www.dinky.org.cn/

1.下载Dinky

wget https://github.com/DataLinkDC/dinky/releases/download/v1.0.1/dinky-release-1.16-1.0.1.tar.gz mv dinky-release-1.16-1.0.1.tar.gz  /opt/datasophon/DDP/packages 
cd /opt/datasophon/DDP/packages md5sum dinky-release-1.16-1.0.1.tar.gz 
56b6d1fdd2c356b4f794ef1a9e514898 dinky-release-1.16-1.0.1.tar.gz echo 56b6d1fdd2c356b4f794ef1a9e514898 > dinky-release-1.16-1.0.1.tar.gz.md5

2.准备服务配置模板

在每个节点的datasophon-worker配置目录下添加配置模板

cd  /opt/datasophon/datasophon-worker/conf/templates
vim dinky.ftlspring:datasource:url: ${databaseUrl}username: ${username}password: ${password}driver-class-name: com.mysql.cj.jdbc.Driver分发ftl(如果在当前节点就不用分发)
scp dinky.ftl datasophon02:/opt/datasophon/datasophon-worker/conf/templates
scp dinky.ftl datasophon03:/opt/datasophon/datasophon-worker/conf/templates重启所有work节点(如果在当前节点安装就不需要重启所有的节点)
sh  /opt/datasophon/datasophon-worker/bin/datasophon-worker.sh restart worker

3.准备配置文件service_ddl.json

进入datasophon-manager-1.2.1中

cd /opt/datasophon-manager-1.2.1/conf/meta/DDP-1.2.1mkdir DINKY && cd DINKYvim service_ddl.json
{"name": "DINKY","label": "Dinky","description": "流处理极速开发框架,流批一体&湖仓一体的云原生平台,一站式计算平台","version": "1.0.1","sortNum": 19,"dependencies":[],"packageName": "dinky-release-1.16-1.0.1.tar.gz","decompressPackageName": "dinky-release-1.16-1.0.1","roles": [{"name": "Dinky","label": "Dinky","roleType": "master","cardinality": "1","logFile": "logs/dinky.log","jmxPort": 10087,"startRunner": {"timeout": "60","program": "auto.sh","args": ["startWithJmx","1.16"]},"stopRunner": {"timeout": "600","program": "auto.sh","args": ["stop"]},"statusRunner": {"timeout": "60","program": "auto.sh","args": ["status"]},"restartRunner": {"timeout": "60","program": "auto.sh","args": ["restart","1.16"]},"externalLink": {"name": "Dinky Ui","label": "Dinky Ui","url": "http://${host}:${serverPort}"}}],"configWriter": {"generators": [{"filename": "application-mysql.yml","configFormat": "custom","outputDirectory": "config","templateName": "dinky.ftl","includeParams": ["databaseUrl","username","password","serverPort"]}]},"parameters": [{"name": "databaseUrl","label": "Dinky数据库地址","description": "","configType": "map","required": true,"type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "jdbc:mysql://${apiHost}:3306/dinky?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"},{"name": "username","label": "Dinky数据库用户名","description": "","configType": "map","required": true,"type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "root"},{"name": "password","label": "Dinky数据库密码","description": "","configType": "map","required": true,"type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "123456"},{"name": "serverPort","label": "Dinky服务端口","description": "","configType": "map","required": true,"type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "8888"}]
}

重启datasophon-manager的api

sh /opt/datasophon-manager-1.2.1/bin/datasophon-api.sh restart api

4.安装Dinky

 

4.1需要我们手动创建数据库并且运行sql

mysql -u root -p -e "create database dinky" 
mysql -u root -p -D dinky < /opt/datasophon/dinky/sql/dinky-mysql.sql

5.Dinky集成grafana监控

5.1 datasophon1.2.1默认存在,可跳过

cd /opt/datasophon/prometheusvim prometheus.yml 检查是否有dinky配置文件  如果没有添加- job_name: 'dinky'file_sd_configs:- files:- configs/dinky.jsoncd /opt/datasophon/prometheus/configsvim dinky.json  检查是否有dinky的配置文件  如果没有添加[{"targets":["datasophon01:10087"]}
] 
然后重启Prometheus服务(以上配置文件1.2.1默认存在,不存在添加后重启prometheus)

5.2 Grafana 配置

通过下图展示的url进去grafana配置图表,默认登陆账户密码:admin :admin

5.3 Grafana 模板文件

vim dinky.json

{"annotations": {"list": [{"builtIn": 1,"datasource": {"type": "grafana","uid": "-- Grafana --"},"enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","target": {"limit": 100,"matchAny": false,"tags": [],"type": "dashboard"},"type": "dashboard"}]},"editable": true,"fiscalYearStartMonth": 0,"graphTooltip": 0,"id": 33,"links": [],"liveNow": false,"panels": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"0": {"text": "下线"},"1": {"text": "正常"}},"type": "value"},{"options": {"match": "null","result": {"text": "下线"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "#d44a3a","value": null},{"color": "#e24d42","value": 0},{"color": "#299c46","value": 1}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 0,"y": 0},"hideTimeOverride": false,"id": 8,"links": [{"targetBlank": true,"title": "Tomcat dashboard","url": "/d/chanjarster-tomcat-dashboard/tomcat-dashboard?$__url_time_range&$__all_variables"}],"maxDataPoints": 100,"options": {"colorMode": "value","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"text": {"valueSize": 38},"textMode": "auto"},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "up{job=\"dinky\"}","format": "time_series","instant": true,"interval": "","intervalFactor": 1,"legendFormat": "","refId": "A"}],"title": "Dinky状态","type": "stat"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "dateTimeAsIso"},"overrides": []},"gridPos": {"h": 4,"w": 8,"x": 4,"y": 0},"id": 2,"links": [],"maxDataPoints": 100,"options": {"colorMode": "value","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"text": {"valueSize": 38},"textMode": "auto"},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "process_start_time_seconds{job=\"dinky\"}*1000","legendFormat": "__auto","range": true,"refId": "A"}],"title": "Dinky启动时间","type": "stat"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "s"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 12,"y": 0},"id": 4,"links": [],"maxDataPoints": 100,"options": {"colorMode": "value","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"text": {"valueSize": 38},"textMode": "auto"},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "time() - process_start_time_seconds{job=\"dinky\"}","interval": "","legendFormat": "","range": true,"refId": "A"}],"title": "Dinky运行时长","type": "stat"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "bytes"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 16,"y": 0},"id": 6,"links": [],"maxDataPoints": 100,"options": {"colorMode": "value","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"text": {"valueSize": 38},"textMode": "auto"},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "jvm_memory_bytes_max{job=\"dinky\",area=\"heap\"}","legendFormat": "__auto","range": true,"refId": "A"}],"title": "Dinky堆内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"mappings": [],"max": 100,"min": 0,"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "%"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 20,"y": 0},"id": 10,"options": {"orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"showThresholdLabels": false,"showThresholdMarkers": true},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "jvm_memory_bytes_used{area=\"heap\",job=\"dinky\"}*100/jvm_memory_bytes_max{area=\"heap\",job=\"dinky\"}","legendFormat": "__auto","range": true,"refId": "A"}],"title": "Dinky堆内存使用率","type": "gauge"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 10,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "never","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"links": [],"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "bytes"},"overrides": [{"matcher": {"id": "byName","options": "Usage %"},"properties": [{"id": "custom.drawStyle","value": "bars"},{"id": "custom.fillOpacity","value": 100},{"id": "color","value": {"fixedColor": "#6d1f62","mode": "fixed"}},{"id": "custom.lineWidth","value": 0},{"id": "unit","value": "percentunit"},{"id": "min","value": 0},{"id": "max","value": 1}]}]},"gridPos": {"h": 10,"w": 12,"x": 0,"y": 4},"id": 12,"links": [],"options": {"legend": {"calcs": ["mean","max"],"displayMode": "table","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},"pluginVersion": "9.1.6","repeat": "memarea","repeatDirection": "h","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "jvm_memory_bytes_used{area=\"heap\",job=\"dinky\"}","legendFormat": "已用内存","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": " jvm_memory_bytes_max{area=\"heap\",job=\"dlink\"}","hide": false,"legendFormat": "总内存","range": true,"refId": "B"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "jvm_memory_bytes_used{area=\"heap\",job=\"dlink\"} / jvm_memory_bytes_max >= 0","hide": false,"legendFormat": "使用率","range": true,"refId": "C"}],"title": "Dinky堆内存使用趋势","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 10,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "never","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"links": [],"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "s"},"overrides": []},"gridPos": {"h": 10,"w": 12,"x": 12,"y": 4},"id": 14,"links": [],"options": {"legend": {"calcs": ["lastNotNull","max","min"],"displayMode": "table","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},"pluginVersion": "9.1.6","targets": [{"datasource": {"type": "prometheus","uid": "hj6gjW44z"},"editorMode": "code","expr": "increase(jvm_gc_collection_seconds_sum{job=\"dinky\"}[$__interval])","format": "time_series","interval": "60s","intervalFactor": 1,"legendFormat": "{{gc}}","metric": "jvm_gc_collection_seconds_sum","range": true,"refId": "A","step": 10}],"title": "Dinky GC时间趋势图","type": "timeseries"}],"schemaVersion": 37,"style": "dark","tags": [],"templating": {"list": []},"time": {"from": "now-6h","to": "now"},"timepicker": {},"timezone": "","title": "Dinky","uid": "9qU9T1OVk","version": 4,"weekStart": ""
}

5.4 导入创建的模板文件

 

查看datasophon数据库中t_ddh_cluster_service_dashboard表中是否原就存在dinky 如果不存在添加

19 DINKY http://${grafanaHost}:3000/d/9qU9T1OVk/dinky?kiosk&refresh=1m

 回到datasophon的dinky服务,刷新即可在总览看到详细监控信息

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/651099.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

分享8款安全监控/日志记录工具

安全监控工具的作用是实时监控和分析系统的安全状态&#xff0c;而日志记录工具的作用主要是记录系统的运行过程及异常信息。 关于安全监控工具&#xff0c;它通过对计算机系统、网络、应用程序和数据进行实时监控和分析&#xff0c;帮助发现和防止安全威胁和攻击。这种监控不…

tcp inflight 守恒算法背后的哲学

tcp inflight 守恒拥塞控制的正确性 很久以前我开始纠结 tcp 锯齿&#xff0c;很多年后我知道这叫 capacity-seeking&#xff0c;甚至说 tcp 属于 capacity-seeking protocol 的原因就是它早已深入人心的 aimd 行为&#xff0c;而该行为生成了 tcp 锯齿。 在消除锯齿&#xf…

您的计算机已被rmallox勒索病毒感染?恢复您的数据的方法在这里!

引言&#xff1a; 在当今数字化时代&#xff0c;网络安全问题日益突出&#xff0c;其中勒索病毒作为一种新型的网络威胁&#xff0c;正逐渐引起人们的广泛关注。其中&#xff0c;.rmallox勒索病毒作为近期出现的一种新型恶意软件&#xff0c;给个人和企业带来了巨大的经济损失…

Open CASCADE学习|一个点的坐标变换

gp_Trsf 类是 Open CASCADE Technology (OCCT) 软件库中的一个核心类&#xff0c;用于表示和操作三维空间中的变换。以下是该类的一些关键成员和方法的介绍&#xff1a; 成员变量&#xff1a; scale: Standard_Real 类型&#xff0c;表示变换的缩放因子。 shape: gp_TrsfFor…

利用Spring Boot后端与Vue前端技术构建现代化电商平台

作者介绍&#xff1a;✌️大厂全栈码农|毕设实战开发&#xff0c;专注于大学生项目实战开发、讲解和毕业答疑辅导。 &#x1f345;获取源码联系方式请查看文末&#x1f345; 推荐订阅精彩专栏 &#x1f447;&#x1f3fb; 避免错过下次更新 Springboot项目精选实战案例 更多项目…

【程序分享1】LAMMPS + OVITO + 晶体缺陷识别 + 点缺陷 + 分子动力学模拟

分享2个分子动力学模拟相关的程序。 1. 一种识别体心立方晶体缺陷的新方法。 2. 无后处理的分子动力学模拟中的并行点缺陷识别: lammps的计算和转储方式 。 感谢论文的原作者&#xff01; 第1个程序 关键词&#xff1a; 1. Atomistic simulations, 2. Molecular dynamics…

JSON六种值类型的写法

JSON&#xff08;JavaScript Object Notation&#xff09;是一种人类可读的文本数据格式。它源于JavaScript&#xff0c;标准开放&#xff0c;格式要求更为严格&#xff0c;独立于具体编程语言&#xff0c;常用于数据交换。 列举一段JSON数据&#xff0c;解释JSON六种值类型的…

网络安全实训Day22

网络空间安全实训-渗透测试 CSRF 定义&#xff1a;跨站伪造请求攻击 攻击者透过诱骗受害者点击攻击者提前构造的恶意链接&#xff0c;从而以受害者的身份向网站服务器发起请求&#xff0c;达到攻击的目的 通过CSRF在网站后台创建管理员 1.搭建创建管理员账号的站点 1.将对方网…

中国大模型落地应用案例集(2023)(医疗、教育、金融、科技、汽车、遥感等52个领域)

近日&#xff0c;中国信通院联合上海人工智能实验室成立的大模型测试验证与协同创新中心牵头&#xff0c;首次面向全国范围征集全行业优秀应用实践&#xff0c;并形成《2023大模型落地应用案例集》&#xff08;以下简称“《案例集》”&#xff09;。 《案例集》一共119页pdf&am…

C语言笔试题之重排链表

重排链表 实例要求 1、给定一个单链表 L 的头节点 head &#xff0c;单链表 L 表示为&#xff1a; L0 → L1 → … → Ln - 1 → Ln2、请将其重新排列后变为&#xff1a; L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …3、不能只是单纯的改变节点内部的值&#xff0c;而是…

鸿蒙OpenHarmony【轻量系统 编译】 (基于Hi3861开发板)

编译 OpenHarmony支持hb和build.sh两种编译方式。此处介绍hb方式&#xff0c;build.sh脚本编译方式请参考[使用build.sh脚本编译源码]。 使用build.sh脚本编译源码 进入源码根目录&#xff0c;执行如下命令进行版本编译。 ./build.sh --product-name name --ccache 说明&…

02.Scala简单演示

Scala创建对象的方法与Java有所不同 class可以直接传入形参&#xff1b; 形式为 变量名称&#xff1a;变量类型 逗号隔开 ** ** 方法定义也比较特殊 ** ** def方法名&#xff08;&#xff09;:返回值 { } 其中返回值Unit 等价于Java中的void