-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
日志监控支持企业微信、钉钉报警吗? #51
Comments
日志监控也支持企业微信、钉钉报警
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月3日(星期三) 上午8:57
***@***.***>;
***@***.***>;
主题: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
日志监控支持企业微信、钉钉报警吗?是不是只有主机监控才支持报警。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
你好,我用企业微信机器人用类似钉钉机器人的bat脚本写了个bat,调整了application.yml,业重启了服务端,日志更新后没有报警 |
您手动执行这个bat能发送成功吗
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月3日(星期三) 上午9:44
***@***.***>;
***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
你好,我用企业微信机器人用类似钉钉机器人的bat脚本写了个bat,调整了application.yml,业重启了服务端,日志更新后没有报警
@echo off
echo warn content is : %1
set timeHour=%time:~0,2%
set timeMin=%time:~3,2%
set timeSec=%time:~6,2%
set content="WARNING: %timeHour%:%timeMin%:%timeSec%, %1"
set content=%content:"=%
set weixin_url="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
curl -H "Content-Type: application/json" -d "{"content":"%content%"}" -s %weixin_url%
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
手动执行可以发测试消息,不过部署到application.yml就没反应了 |
server日志文件里有什么错误信息吗
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年8月3日(周三) 上午10:10
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
手动执行可以发测试消息,不过部署到application.yml就没反应了
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
2022-08-03 10:26:17.474 [pool-1-thread-4] ERROR com.wgcloud.util.ExecUtil - ????????? |
你看日志文件里,那几个????????是什么
日志文件里不是乱码
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月3日(星期三) 上午10:35
***@***.***>;
***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
2022-08-03 10:26:17.474 [pool-1-thread-4] ERROR com.wgcloud.util.ExecUtil - ?????????
java.io.IOException: Cannot run program "E:\Downloads\wgcloud-v3.3.9\server\weixinbot.bat": CreateProcess error=206, ??????????
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.wgcloud.util.ExecUtil.runScript(ExecUtil.java:41)
at com.wgcloud.util.msg.WarnMailUtil.sendUtil(WarnMailUtil.java:1008)
at com.wgcloud.util.msg.WarnMailUtil.sendFileWarnDown(WarnMailUtil.java:935)
at com.wgcloud.controller.AgentLogGoController.lambda$minTask$0(AgentLogGoController.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=206, ??????????
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 common frames omitted
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
你试试把weixinbot.bat放到e:/根目录下
你的windows是什么版本
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月3日(星期三) 上午10:42
***@***.***>;
***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
好像就是?号
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
如果监控周期内日志监控数据或日志条数太多了,是不是会报错,推不出来 |
1 similar comment
如果监控周期内日志监控数据或日志条数太多了,是不是会报错,推不出来 |
版本是server 2016 |
测试了下用curl发送长度有限制,同时微信机器人也有长度限制,超过了就报错了,建议日志可以按行拆分下,或者发送报警时控制下发送内容长度,超过了可以拆分成几个告警发送。 |
感谢反馈
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月5日(星期五) 下午2:26
***@***.***>;
***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
测试了下用curl发送长度有限制,同时微信机器人也有长度限制,超过了就报错了,建议日志可以按行拆分下,或者发送报警时控制下发送内容长度,超过了可以拆分成几个告警发送。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
你这个是shell脚本吗
你在shell中就可以处理下告警内容长度
Good Luck
WGCLOUD
…------------------ 原始邮件 ------------------
发件人: "tianshiyeben/wgcloud" ***@***.***>;
发送时间: 2022年8月5日(星期五) 下午2:36
***@***.***>;
***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
curl超过1024字节可能就有问题,微信机器人直接限制5120字节
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
bat脚本,我部署在win2016上。 |
是不是除了日志监控告警,其他的告警信息微信可以收到
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年8月3日(周三) 中午11:35
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
如果监控周期内日志监控数据或日志条数太多了,是不是会报错,推不出来
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
频率不高的可以<br/><br/><br/><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="imail_signature" class="ntes-signature"> <a href="https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=nsfjiang%40sina.com&uid=nsfjiang%40sina.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9Ansfjiang%40sina.com%22%5D" style="display:block;background:#fff; max-width: 400px; _width: 400px;padding:15px 0 10px 0;text-decoration: none; outline:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<table cellpadding="0" style='width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse;color: #9b9ea1;font-size: 14px;line-height:1.3;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;'>
<tbody style="font-family: 'PingFang SC', 'Hiragino Sans GB','WenQuanYi Micro Hei', 'Microsoft Yahei', '微软雅黑', verdana !important; word-wrap:break-word; word-break:break-all;-webkit-text-size-adjust:none !important;text-size-adjust:none !important;">
<tr>
<td width="38" style="padding:0; box-sizing: border-box; width: 38px;">
<img width="38" height="38" style="vertical-align:middle; width: 38px; height: 38px; border-radius:50%;" src="https://mail-online.nosdn.127.net/qiyelogo/defaultAvatar.png" />
</td>
<td style='padding: 0 0 0 10px; color: #31353b;'>
<div style="font-size: 16px;font-weight:bold; width:100%; white-space: nowrap; overflow:hidden;text-overflow: ***@***.***</div>
</td>
</tr>
<tr width="100%" style="font-size: 14px !important; width: 100%;">
<td colspan='2' style="padding:10px 0 0 0; font-size:14px !important; width: 100%;">
<div style="width: 100%;font-size: 14px ***@***.***</div>
</td>
</tr>
</tbody>
</table>
</a></div><br/><br/><br/><div class="ntes-mailmaster-quote" style="padding-top: 1px; padding-bottom: 1px" >
<div style=" margin-top: 20px; margin-bottom: 12px; font-size: 14px; line-height: 1.25; color: #89898c; " >---- 回复的原邮件 ----</div>
<div style=" margin-bottom: 12px; font-size: 13px; line-height: 1.25; color: #2c2c2e; padding: 2px; border-radius: 8px; background-color: #f0f0f0; " >
<table width="100%" cellpadding="0" cellspacing="10" border="0">
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >发件人</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-from" style="color: #1c83eb; text-decoration: none" ***@***.***" ***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; white-space: nowrap; " >日期</td>
<td class="mail-date" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >2022年10月11日 16:31</td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >收件人</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-to" style="color: #1c83eb; text-decoration: none" ***@***.***" ***@***.***></a></td>
</tr>
<tr style="">
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >抄送至</td>
<td valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " ><a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" ***@***.***></a>、<a class="mail-cc" style="color: #1c83eb; text-decoration: none" ***@***.***" ***@***.***></a></td>
</tr>
<tr>
<td valign="top" style=" width: 4em; font-size: 13px; line-height: 1.25; color: #89898c; " >主题</td>
<td class="mail-subject" valign="top" style=" font-size: 13px; line-height: 1.25; color: #2c2c2e; word-break: break-all; " >Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)</td>
</tr>
</table>
</div>
<div><p></p>
是不是除了日志监控告警,其他的告警信息微信可以收到
<br>
<br>
<br>
<br>
---原始邮件---
<br>
发件人: ***@***.***&gt;
<br>
发送时间: 2022年8月3日(周三) 中午11:35
<br>
收件人: ***@***.***&gt;;
<br>
抄送: ***@***.******@***.***&gt;;
<br>
主题: Re: [tianshiyeben/wgcloud] 日志监控支持企业微信、钉钉报警吗? (Issue #51)
<br>
<br>
<br>
<br>
<br>
<br>
如果监控周期内日志监控数据或日志条数太多了,是不是会报错,推不出来
<br>
<br>
—
<br>
Reply to this email directly, view it on GitHub, or unsubscribe.
<br>
You are receiving this because you commented.Message ID: ***@***.***&gt;
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="#51 (comment)">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANYUEGWTBEC4WYORNWOIGR3WCUQVBANCNFSM55NBELMQ">unsubscribe</a>.<br />You are receiving this because you authored the thread.<img src="https://github.com/notifications/beacon/ANYUEGXLUM7637TKE5UUOUDWCUQVBA5CNFSM55NBELM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJP2FZOI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><tianshiyeben/wgcloud/issues/51/1274305721</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#51 (comment)",
"url": "#51 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script></div>
</div>
</body>
</html>
|
日志监控支持企业微信、钉钉报警吗?是不是只有主机监控才支持报警。
The text was updated successfully, but these errors were encountered: