我的 MSSQL 服务器中有一个表,我们称之为blogPost。我还有两个标签表,我们称它们为fooTag和barTag。标记表用于标记blogPost结构相同的表。
blogPost
| postId | title | body |
+--------+---------------------+-------------+
| 1 | The life on a query | lorem ipsum |
+--------+---------------------+-------------+
fooTag and barTag
| postId | tagName |
+--------+--------------+
| 1 | sql |
| 1 | query |
| 1 | select-query |
+--------+--------------+
Run Code Online (Sandbox Code Playgroud)
我想在一行中获取一篇博文及其所有标签,因此STRING_AGG()适合进行如下查询:
blogPost
| postId | title | body |
+--------+---------------------+-------------+
| 1 | The life on a query | lorem …Run Code Online (Sandbox Code Playgroud) 我是 Playwright 的新手,我试图获取选定的选项值,并将其更改为使用 playwright 包含 mat-select 元素的 mat-form-field 的另一个选项。
我试过
await page.selectOption('select#colors', { label: 'Blue' });
即 selectOptions 不适用于垫选择元素
<mat-form-field>
<mat-select id="selectColor" [formControl]="colcorselect" (click)="$event.stopPropagation()">
<mat-option *ngFor="let filter of savedColorOptions" [value]="filter (click)="savedFilterChange($event, filter)">
{{filter}}
</mat-option>
</mat-select>
</mat-form-field>
Run Code Online (Sandbox Code Playgroud) 我在Azure中有一个Function项目,当项目放入队列时会触发该应用程序.它看起来像这样(大大简化):
public static async Task Run(string myQueueItem, TraceWriter log)
{
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(Config.APIUri);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
StringContent httpContent = new StringContent(myQueueItem, Encoding.UTF8, "application/json");
HttpResponseMessage response = await client.PostAsync("/api/devices/data", httpContent);
response.EnsureSuccessStatusCode();
string json = await response.Content.ReadAsStringAsync();
ApiResponse apiResponse = JsonConvert.DeserializeObject<ApiResponse>(json);
log.Info($"Activity data successfully sent to platform in {apiResponse.elapsed}ms. Tracking number: {apiResponse.tracking}");
}
}
Run Code Online (Sandbox Code Playgroud)
这一切都很好,运行得很好.每次将项目放入队列时,我们都会将数据发送到我们这边的某个API并记录响应.凉.
当"产生队列消息的东西"出现大幅增加并且许多项目立即被放入队列时,就会出现问题.这往往会在一分钟内发生大约1,000到1,500件物品.错误日志将具有以下内容:
2017-02-14T01:45:31.692 mscorlib:执行函数时出现异常:Functions.SendToLimeade.f-SendToLimeade __- 1078179529:发送请求时发生错误.系统:无法连接到远程服务器.系统:通常只允许使用每个套接字地址(协议/网络地址/端口)123.123.123.123:443.
起初,我认为这是Azure功能应用程序运行本地套接字的问题,如此处所示.但是,我注意到了IP地址.IP地址123.123.123.123(当然在本例中已更改)是我们的IP地址,即HttpClient发布的IP地址.所以,现在我想知道是不是我们的服务器用完了套接字来处理这些请求.
无论哪种方式,我们都会遇到扩展问题.我正试图找出解决问题的最佳方法.
一些想法:
我正在尝试使用带有 prometheus 的 blackbox_exporter ping 目标列表,但我似乎只能探测 blackbox_exporters 而不是我想要检查的实际目标。
我在 blackbox 中找不到任何关于在哪里列出目标应该列出的文档,所以我做了一个奇怪的假设,它使用了 prometheus 配置中提供的目标,但据我所知,这只是让 prometheus 相信有很多黑盒探测。
这是我的 blackbox_exporter 配置
modules:
icmp:
prober: icmp
timeout: 5s
icmp:
preferred_ip_protocol: ip4
Run Code Online (Sandbox Code Playgroud)
但是,当我访问 blackbox 的 Web GUI 时,配置包含一堆我没有指定的参数。
modules:
icmp:
prober: icmp
timeout: 5s
http:
ip_protocol_fallback: true
tcp:
ip_protocol_fallback: true
icmp:
preferred_ip_protocol: ip4
ip_protocol_fallback: true
dns:
ip_protocol_fallback: true
Run Code Online (Sandbox Code Playgroud)
这是我的普罗米修斯配置
global:
scrape_interval: 15s
evaluation_interval: 15s
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- icmp-target1 # supposed to be a switch, router, pc …Run Code Online (Sandbox Code Playgroud) azure ×1
azure-queues ×1
group-by ×1
playwright ×1
prometheus ×1
prometheus-blackbox-exporter ×1
selector ×1
sql ×1
sql-server ×1