我在 k8s 中运行 Prometheus。您能否建议我如何更改prometheus.yaml集群中的运行配置?我只想简单地改变:
scrape_configs:
- job_name: my-exporter
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?
谢谢。
我的问题与 2011 年的一种形式非常相似,Signing and verifying signatures with RSA C#。尽管如此,当我比较签名数据和原始消息时,我也会出错。请指出我的错误。
代码:
public static void Main(string[] args)
{
//Generate a public/private key pair.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Save the public key information to an RSAParameters structure.
RSAParameters RSAPublicKeyInfo = RSA.ExportParameters(false);
RSAParameters RSAPrivateKeyInfo = RSA.ExportParameters(true);
string message = "2017-04-10T09:37:35.351Z";
string signedMessage = SignData(message, RSAPrivateKeyInfo);
bool success = VerifyData(message, signedMessage, RSAPublicKeyInfo);
Console.WriteLine($"success {success}");
Console.ReadLine();
}
Run Code Online (Sandbox Code Playgroud)
签约方式:
public static string SignData(string message, RSAParameters privateKey)
{
ASCIIEncoding byteConverter = new ASCIIEncoding();
byte[] signedBytes; …Run Code Online (Sandbox Code Playgroud) 我想在 bash 任务中生成一个密码。我想出了以下几点:
- task: Bash@3
displayName: 'Bash generate password'
inputs:
targetType: 'inline'
script: |
password=$(cat /dev/urandom | tr -dc 'A-Za-z0-9_!@#$%^&*()\-+=' | fold -w 32 | head -n 1)
echo "##vso[task.setvariable variable=password]$password"
Run Code Online (Sandbox Code Playgroud)
不幸的是,这似乎不起作用,因为任务会永远运行。代理是Linux机器。
azure ×1
azure-devops ×1
bash ×1
c# ×1
config ×1
encoding ×1
kubernetes ×1
prometheus ×1
rsa ×1
signing ×1