cwielenb/CNCF-Dataset huggingface dataset:
Project: Grafana Loki (Observability and Analysis / Observability)
File: README.md

](https://travis-ci.org/kubernetes-sigs/yaml) kubernetes-sigs/yaml is a permanent fork of . A wrapper around designed to enable a better way of handling YAML when marshaling to and from structs. In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, . This package uses and therefore supports . Caveat #1: When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example: ``` BAD: exampleKey: !!binary gIGC GOOD: exampleKey: gIGC ... and decode the base64 data in your code. ``` Caveat #2: When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys. To install, run: ``` $ go get sigs.k8s.io/yaml ``` And import using: ``` import "sigs.k8s.io/yaml" ``` Usage is very similar to the JSON library: ```go package main import ( "fmt" "sigs.k8s.io/yaml" ) type Person struct { Name string `json:"name"` // Affects YAML field names too. Age int `json:"age"` } func main() { // Marshal a Person struct to YAML. p := Person{"John", 30} y, err := yaml.Marshal(p) if err != nil { fmt.Printf("err: %v\n", err) return } fmt.Println(string(y)) /* Output: age: 30 name: John */ // Unmarshal the YAML back into a Person struct. var p2 Person err = yaml.Unmarshal(y, &p2) if err != nil { fmt.Printf("err: %v\n", err) return } fmt.Println(p2) /* Output: {John 30} */ } ``` `yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available: ```go package main import ( "fmt" "sigs.k8s.io/yaml" ) func main() { j := []byte(`{"name": "John", "age": 30}`) y, err := yaml.JSONToYAML(j) if err != nil { fmt.Printf("err: %v\n", err) return } fmt.Println(string(y)) /* Output: age: 30 name: John */ j2, err := yaml.YAMLToJSON(y) if err != nil { fmt.Printf("err: %v\n", err) return } fmt.Println(string(j2)) /* Output: {"age":30,"name":"John"} */ } ```
Project: Grafana Pyroscope (Observability and Analysis / Observability)
File: traces-to-profiles.md

title: Traces to profiles menuTitle: Traces to profiles description: Learning about traces to profiles integration in Grafana and Grafana Cloud. weight: 150 keywords: pyroscope continuous profiling tracing {{< admonition type="note" >}} Your application must be instrumented for profiles and traces. For more information, refer to . {{< /admonition >}} {{< docs/shared source="grafana" lookup="datasources/tempo-traces-to-profiles.md" version="<GRAFANA VERSION>" >}}
Project: HertzBeat (Observability and Analysis / Observability)
File: mariadb.md

id: mariadb title: MonitoringMariaDB database monitoring sidebar_label: MariaDB database keywords: [open source monitoring tool, open source database monitoring tool, monitoring mariadb database metrics] Collect and monitor the general performance Metrics of MariaDB database. Support MariaDB5+. | Parameter name | Parameter help description | | -- | -- | | Monitoring Host | Monitored IPV4, IPV6 or domain name. NoteWithout protocol header (eg: https://, http://) | | Monitoring name | Identify the name of this monitoring. The name needs to be unique | | Port | Port provided by the database. The default is 3306 | | Query timeout | Set the timeout time when SQL query does not respond to data, unit: ms, default: 3000ms | | Database name | Database instance name, optional | | Username | Database connection user name, optional | | Password | Database connection password, optional | | URL | Database connection URLoptionalIf configured, the database name, user name, password and other parameters in the URL will overwrite the above configured parameters | | Collection interval | Interval time of monitor periodic data collection, unit: second, and the minimum interval that can be set is 30 seconds | | Whether to detect | Whether to detect and check the availability of monitoring before adding monitoring. Adding and modifying operations will continue only after the detection is successful | | Description remarks | For more information about identifying and describing this monitoring, users can note information here | | Metric name | Metric unit | Metric help description | | -- | -- | -- | | version | none | Database version | | port | none | Database exposure service port | | datadir | none | Database storage data disk address | | max_connections | none | Database maximum connections | | Metric name | Metric unit | Metric help description | | -- | -- | -- | | threads_created | none | MariaDB created total connections | | threads_connected | none | MariaDB connected connections | | threads_cached | none | MariaDB current cached connections | | threads_running | none | MariaDB current active connections | | Metric name | Metric unit | Metric help description | | -- | -- | -- | | innodbdatareads | none | innodb average number of reads from files per second | | innodbdatawrites | none | innodb average number of writes from file per second | | innodbdataread | KB | innodb average amount of data read per second | | innodbdatawritten | KB | innodb average amount of data written per second |
Project: Embrace (Observability and Analysis / Observability)
File: CHANGELOG.md

Features Updates Adds `MigrationService` in `EmbraceStorage` target to structure DB migrations that occur. Will perform migrations during SDK setup if any are outstanding. Converted existing DB schema to be initialized using migrations. April 22nd, 2024 Features Initial release of the 6.0.0 SDK. This major version introduces a new core architecture focusing on: Tracing and Logging at its core. Persistence in SQLite using Swift-first interface for developers of Apple platforms Automatic Instrumentation of: Application Crash Reports Network Requests Device Low Power Mode Application Memory Warnings UIViewController appearance User Tap Gestures Manual instrumentation using: Spans for Performance Tracing Log messages Breadcrumbs Allows for generic export of Traces and Logs via the protocols in the . Allows for custom Automatic Instrumentation via `CaptureService` subclasses
Project: Checkmk (Observability and Analysis / Observability)
File: 16808.md

key | value | date | 2024-04-24T14:01:07+00:00 version | 2.4.0b1 class | fix edition | cre component | checks level | 1 compatible | yes This fixes a regression in Checkmk 2.3 beta. The integration to monitor "3PAR Configuration" mistakenly only accepted any subset of the default values as valid values.
Project: GO Feature Flag (Observability and Analysis / Feature Flagging)
File: quickstart.md

sidebar_position: 10 ```bash go get github.com/thomaspoignant/go-feature-flag ``` First, you need to initialize the `ffclient` with the location of your backend file. ```go linenums="1" err := ffclient.Init(ffclient.Config{ PollingInterval: 3 * time.Second, Retriever: &httpretriever.Retriever{ URL: "http://example.com/flag-config.yaml", }, }) defer ffclient.Close() ``` *This example will load a file from an HTTP endpoint and will refresh the flags every 3 seconds (if you omit the PollingInterval, the default value is 60 seconds).* Now you can evaluate your flags anywhere in your code. ```go linenums="1" user := ffuser.NewUser("user-unique-key") hasFlag, _ := ffclient.BoolVariation("test-flag", user, false) if hasFlag { // flag "test-flag" is true for the user } else { // flag "test-flag" is false for the user } ``` You can find more examples in the directory.
Project: Elastic (Observability and Analysis / Observability)
File: date_extract.md

<!-- This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. --> Extracts parts of a date, like year, month, day, hour. ``` ROW date = DATE_PARSE("yyyy-MM-dd", "2022-05-06") | EVAL year = DATE_EXTRACT("year", date) ```
Project: Grafana Tempo (Observability and Analysis / Observability)
File: readme.md

][API] ](https://goreportcard.com/report/github.com/grpc/grpc-go) ](https://codecov.io/gh/grpc/grpc-go) The implementation of : A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the , or jump directly into the . : any one of the three latest major . Simply add the following import to your code, and then `go [build|run|test]` will automatically fetch the necessary dependencies: ```go import "google.golang.org/grpc" ``` Note: If you are trying to access `grpc-go` from China, see the below. , which include a and [API reference][API] among other resources from this repository The `golang.org` domain may be blocked from some countries. `go get` usually produces an error like the following when this happens: ```console $ go get -u google.golang.org/grpc package google.golang.org/grpc: unrecognized import path "google.golang.org/grpc" (https fetch: Get https://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout) ``` To build Go code, there are several options: Set up a VPN and access google.golang.org through that. With Go module support: it is possible to use the `replace` feature of `go mod` to create aliases for golang.org packages. In your project's directory: ```sh go mod edit -replace=google.golang.org/grpc=github.com/grpc/grpc-go@latest go mod tidy go mod vendor go build -mod=vendor ``` Again, this will need to be done for all transitive dependencies hosted on golang.org as well. For details, refer to [golang/go issue Please update to the latest version of gRPC-Go using `go get google.golang.org/grpc`. The default logger is controlled by environment variables. Turn everything on like this: ```console $ export GRPCGOLOGVERBOSITYLEVEL=99 $ export GRPCGOLOGSEVERITYLEVEL=info ``` This error means the connection the RPC is using was closed, and there are many possible reasons, including: mis-configured transport credentials, connection failed on handshaking bytes disrupted, possibly by a proxy in between server shutdown Keepalive parameters caused connection shutdown, for example if you have configured your server to terminate connections regularly to [trigger DNS lookups](https://github.com/grpc/grpc-go/issues/3170#issuecomment-552517779). If this is the case, you may want to increase your , to allow longer RPC calls to finish. It can be tricky to debug this because the error happens on the client side but the root cause of the connection being closed is on the server side. Turn on logging on both client and server, and see if there are any transport errors.
Project: Checkmk (Observability and Analysis / Observability)
File: testing.md

Install certificate either from real certificate positions 1..7 or using next powershell command ```powershell New-SelfSignedCertificate -Type SSLServerAuthentication -Subject "CN=$env:COMPUTERNAME" ` -DnsName ("{0}" -f [System.Net.Dns]::GetHostByName($env:computerName).HostName),'localhost' ` -KeyAlgorithm "RSA" -KeyLength 2048 -HashAlgorithm "SHA256" -TextExtension "2.5.29.37={text}1.3.6.1.5.5.7.3.1" ` -NotAfter (Get-Date).AddMonths(36) -KeySpec KeyExchange -Provider "Microsoft RSA SChannel Cryptographic Provider" ` -CertStoreLocation "cert:\LocalMachine\My" ``` In SQL Server Configuration Manager set certificate from p.1 In the MMC console, right-click the imported certificate, point to All Tasks, and select Manage Private Keys. In the Security dialog box, add read permission for the user account used by the SQL Server service account. In SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for "server instance", and select Properties. In the Protocols for "instance name" Properties dialog box, on the Certificate tab, select the desired certificate from the drop-down for the Certificate box, and then select OK. Export certificate from p.2 in DER format and change extension to der. You may use file from p.3 as CA certificate You may use `CITESTMSSQLDB_CERT` environment variable to store path to certificate Fort example on Windows: ```batch setx CITESTMSSQLDB_CERT c:\common\checkmk\certificates\mssql-YOUR-MACHINE-NAME.der ``` Testing code is looks like ```rust pub const MSSQLDBCERT: &str = "CITESTMSSQLDBCERT"; if let Ok(certificatepath) = std::env::var(MSSQLDBCERT) { createlocal(1433u16, certificatepath.to_owned().into()) .await .unwrap(); } else { eprintln!("Error: environment variable {} is absent no testing", MSSQLDB_CERT); } ```
Project: Grafana Loki (Observability and Analysis / Observability)
File: release-note.md

This is release `${DRONE_TAG}` of Loki. :warning: ADD RELEASE NOTES HERE :warning: The components of Loki are currently distributed in plain binary form and as Docker container images. Choose what fits your use-case best. https://hub.docker.com/r/grafana/loki https://hub.docker.com/r/grafana/promtail ```bash $ docker pull "grafana/loki:${DRONETAGNO_V}" $ docker pull "grafana/promtail:${DRONETAGNO_V}" ``` We provide pre-compiled binary executables for the most common operating systems and architectures. Choose from the assets below for the application and architecture matching your system. Example for `Loki` on the `linux` operating system and `amd64` architecture: ```bash $ curl -O -L "https://github.com/grafana/loki/releases/download/${DRONE_TAG}/loki-linux-amd64.zip" $ unzip "loki-linux-amd64.zip" $ chmod a+x "loki-linux-amd64" ```
Project: Promscale (Observability and Analysis / Observability)
File: PromscaleCacheHighNumberOfEvictions.md

Promscale is evicting cache entries at a higher rate than expected Ingestion and query operations have poor throughput performance Open Promscale dashboard in Grafana Go to Evictions chart in Cache section If the evictions is high, see for mitigation Increase the cache size based on the requirement. See the `cache` based flags
Project: Grafana Mimir (Observability and Analysis / Observability)
File: list-deduplicated-blocks.md

`list-deduplicated-blocks` downloads all `meta.json` files from tenants' debug/metas directory, removes duplicates (using `ShardAwareDeduplicateFilter`), and prints information about remaining blocks. This should output blocks that are supposed to be in the bucket (although old blocks may have been deleted due to retention -- Mimir doesn't cleanup meta.json file from debug/metas in such case). To make this process faster, it is recommended to sync debug/metas to local disk before running this program: Eg. ``` cd /tmp/test-bucket mkdir -p tenant cd tenant gsutil -m cp -r -n gs://bucket/tenant/debug . ``` And then run: ``` list-deduplicated-blocks -backend=filesystem -filesystem.dir=/tmp/test-bucket -user=tenant ```
Project: Litmus (Observability and Analysis / Chaos Engineering)
File: experiment-tunable-specification.md

It contains the array of tunables passed to the experiment pods as environment variables. It is used to manage the experiment execution. We can set the default values for all the variables (tunable) here which can be overridden by ChaosEngine from `.spec.experiments[].spec.components.env` if required. To know about the variables that need to be overridden check the list of "mandatory" & "optional" env for an experiment as provided within the respective experiment documentation. It can be provided at `spec.definition.env` inside chaosexperiment. ??? info "View the experiment tunables specification" <table> <tr> <th>Field</th> <td><code>.spec.definition.env</code></td> </tr> <tr> <th>Description</th> <td>Flag to specify env used for ChaosExperiment</td> </tr> <tr> <th>Type</th> <td>Mandatory</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: {name: string, value: string})</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td> The <code>.spec.definition.env</code> specifies the array of tunables passed to the experiment pods as environment variables. It is used to manage the experiment execution. We can set the default values for all the variables (tunable) here which can be overridden by ChaosEngine from <code>.spec.experiments[].spec.components.env</code> if required. To know about the variables that need to be overridden check the list of "mandatory" & "optional" env for an experiment as provided within the respective experiment documentation.</td> </tr> </table> Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 description: message: | Deletes a pod belonging to a deployment/statefulset/daemonset kind: ChaosExperiment metadata: name: pod-delete labels: name: pod-delete app.kubernetes.io/part-of: litmus app.kubernetes.io/component: chaosexperiment app.kubernetes.io/version: latest spec: definition: scope: Namespaced permissions: apiGroups: "" "apps" "apps.openshift.io" "argoproj.io" "batch" "litmuschaos.io" resources: "deployments" "jobs" "pods" "pods/log" "replicationcontrollers" "deployments" "statefulsets" "daemonsets" "replicasets" "deploymentconfigs" "rollouts" "pods/exec" "events" "chaosengines" "chaosexperiments" "chaosresults" verbs: "create" "list" "get" "patch" "update" "delete" "deletecollection" image: "litmuschaos/go-runner:latest" imagePullPolicy: Always args: -c ./experiments -name pod-delete command: /bin/bash env: name: TOTALCHAOSDURATION value: '15' name: RAMP_TIME value: '' name: FORCE value: 'true' name: CHAOS_INTERVAL value: '5' name: PODSAFFECTEDPERC value: '' name: LIB value: 'litmus' name: TARGET_PODS value: '' name: SEQUENCE value: 'parallel' labels: name: pod-delete app.kubernetes.io/part-of: litmus app.kubernetes.io/component: experiment-job app.kubernetes.io/version: latest ```
Project: Vector (Observability and Analysis / Observability)
File: 2020-08-31-mpl-2-0-license.md

date: "2020-08-31" title: "Switching to the MPL 2.0 License" description: "The Vector project has switched to the Mozilla Public License 2.0" authors: ["binarylogic"] pr_numbers: [1314] release: "0.11.0" hideonrelease_notes: true badges: type: "announcement" Vector has switched to the , a weak copyleft license used by other popular open-source projects, such as and . by Julien Ponge describes the license well, and the offers a more in-depth analysis: Like all other free and open source software, software available under the MPL is available for anyone (including individuals and companies) to use for any purpose. The MPL only creates obligations for you if you want to distribute the software outside your organization. We love open-source, and we feel this license more accurately embodies the spirit of open-source by requiring direct Vector code changes (not code around it) to be made in the open. This ensures that the entire Vector community benefits from changes. A fundamental principle of open-source. No! It is not our intent to restrict Vector usage or distribution in any way, now or in the future.
Project: Promscale (Observability and Analysis / Observability)
File: troubleshooting-guide.md

This is a basic set of information that is almost always relevant to troubleshooting. Determine the version of Postgres, TimescaleDB, the Promscale connector, and the Promscale extension. Postgres: `select version();` Timescaledb and the Promscale extensions: `select extname, extversion from pg_extension where extname in ('timescaledb', 'promscale');` Determine the chunk policy: `select promcatalog.getdefaultchunk_interval();` Determine the retention policy: `select promcatalog.getdefaultretention_period();` Determine the infrastructure setup for TimescaleDB and Promscale. Does anything else share compute or storage resources (do other things run on the same infrastructure?)? If using Prometheus (run PromQL queries against Promscale if you have multiple Prometheus instances) Number of Prometheus instances Total metric ingest rate (if you are ingesting metrics): `sum(rate(prometheustsdbheadsamplesappended_total[5m]))` Total active series: `prometheustsdbhead_series` Series churn: `sum(rate(prometheustsdbheadseriescreated_total[5m]))` If using OpenTelemetry traces: Span ingest rate: `SELECT count()/600 as spanthroughput FROM pstrace.span WHERE start_time > NOW() - INTERVAL '10m';` Check how many chunks are compressed / uncompressed: ```SQL SELECT is_compressed,count(*) FROM timescaledb_information.chunks WHERE hypertableschema='promdata' GROUP BY is_compressed; ``` Usually, if background jobs are taking a very long time and consuming a lot of resources it happened in versions 0.10.0 and earlier as the number of chunks in the database grew. Upgrading to 0.11.0 or later should improve things significantly. You can check in the database to see what statements are taking most time to execute. Are they related to compression, or to retention? (The pgstatstatements extension is loaded by default in timescale cloud.) ```SQL -- pgstatactivity shows the current activity of database clients SELECT * FROM pgstatactivity; -- pgstatstatements shows performance info for queries that have been run SELECT * FROM pgstatstatements order by totalexectime DESC; ``` The info in pgstatstatements is cumulative. If you want to reset that data to start with a clean slate, run this: ```SQL SELECT pgstatstatements_reset(); ``` Check if there is lock contention with the following queries: ```SQL select * from pg_locks where not granted; select pid, usename, pgblockingpids(pid) as blocked_by, query as blocked_query from pgstatactivity where cardinality(pgblockingpids(pid)) > 0; ```
Project: Logging Operator (Kube Logging) (Observability and Analysis / Observability)
File: record_modifier.md

title: Record Modifier weight: 200 generated_file: true Modify each event record. Fluentd including some plugins treats logs as a BINARY by default to forward. To overide that, use a target encoding or a from:to encoding here. Prepare values for filtering in configure phase. Prepared values can be used in `<record>`. You can write any ruby code. Add records docs at: https://github.com/repeatedly/fluent-plugin-record-modifier Records are represented as maps: `key: value` A comma-delimited list of keys to delete Replace specific value for keys This is exclusive with remove_keys {{< highlight yaml >}} apiVersion: logging.banzaicloud.io/v1beta1 kind: Flow metadata: name: demo-flow spec: filters: record_modifier: records: foo: "bar" selectors: {} localOutputRefs: demo-output {{</ highlight >}} Fluentd config result: {{< highlight xml >}} <filter > @type record_modifier @id testrecordmodifier <record> foo bar </record> </filter> {{</ highlight >}} Specify replace rule. This directive contains three parameters. Regular expression Key to search for Value to replace with