Comments (11)
感谢反馈,这个问题我来看看
from categraf.
@kongfei605 我发现脚本有中文注释,脚本是可以正常执行的,但是server的状态也是running,然后timeout。
from categraf.
数据库里的 task_xx 那一百张表,用的是什么字符集?
from categraf.
@UlricQin
数据库表的编码
from categraf.
那不清楚了,按理说就是字符集的问题:
from categraf.
@UlricQin 大佬,那你们有没有测试过,在windows执行对应的脚本,脚本中包含中文,如果你们是可以的,我再排查一下环境。
from categraf.
from categraf.
我手头有个 Macbook,在 Mac 上使用容器运行整套环境,可以正常看到脚本输出的中文:
from categraf.
cmd 脚本没法用 UTF-8编码,这方面要做些特殊处理
from categraf.
反馈的 issue 包含两个问题
- task#start() 阶段,若是出现 error,没有正确设置 status,任务仍被识别为 running
- cmd 运行脚本,需要使用 ANSI 编码 + CRLF 换行。golang 内部均为unicode编码,没中文的话 utf8 与 ANSI 在 ASCII 范围内一致所以没问题。
这问题不算难搞,稍后我提个patch
其实还有个问题,脚本传入换行为 LF,应该会出现吞命令的,但是你这个却没出现,有点意外,这个脚本难道是从外部粘贴进来的吗?
如果是这样,n9e那边的编辑器需要补个换行符过滤了,避免 Linux 脚本出现 CRLF 导致无法执行。
若是改用 powershell(pwsh),则可以使用utf-8 + LF,不过改造工程有点大,需要n9e也加表单加字段,链路较长
from categraf.
golang 会自动处理windows和linux的换行差异
from categraf.
Related Issues (20)
- postgre 监控采集up指标异常 HOT 1
- 夜莺怎么设置GPU的告警呀?很着急,window 使用了categraf 的dcgm插件 启动categraf 却说 dcgm not support HOT 4
- 关于日志采集存储 HOT 3
- 日志采集未按照预期 HOT 2
- categraf输出到promethues的数据时间不对 HOT 10
- 开源提供本地配置自动热更新 HOT 2
- 关于promethues agent模式如何使用 HOT 11
- 对Anolis OS 兼容问题 HOT 8
- Categraf 对应插件没有up指标么?
- 我没有在categraf输出看到指标记录的时间戳 HOT 3
- Feat: logs 适配 es/loki/otel 等日志系统 HOT 2
- 夜莺未来是否有考虑做服务日志方面的条件采集+数据加工? HOT 1
- categraf使用input.prometheus,配置consul服务发现,无法采集数据 HOT 11
- 日志采集时,能否针对不同的日志使用不同的处理规则 HOT 5
- 如何降低拉取cloudwatch api指标的频率? HOT 4
- 使用categraf的oracle模块配合夜莺提供的仪表盘有些页面是空白的如何处理? HOT 1
- categraf在有些情况不能启动,帮忙看一下 HOT 3
- 阿里云 oss 云监控采集指标没有oss名称 HOT 1
- systemd方式无法启动categraf服务 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from categraf.