question
stringlengths
11
28.2k
answer
stringlengths
26
27.7k
tag
stringclasses
130 values
question_id
int64
935
78.4M
score
int64
10
5.49k
Eclipse is driving me nuts right now. It's probably something trivial but I just don't get it. Whenever I like to add a breakpoint, the regular icons are crossed out in the editor and breakpoints view. As you might have guessed, this isn't strictly a graphical problem ;) The breakpoints are simply ignored while debugg...
It seems you have the Skip All Breakpoints option enabled in the Breakpoints view.
Helios
3,187,805
14
First, Eclipse is not my native IDE -- I'm barely a n00b with it. I set up a project in a workspace that was actually in the directory of another client's project (I didn't really follow the whole workspace/project thing) and, in fact, now I can't even find the Eclipse workspace file to open it. What I'd like to do is...
Roughly a workspace (which is a directory) in Eclipse contains: configuration (installed JRE, Servers runtimes, code formatting rules, ...) one or more projects You can of course have as many workspaces as you want (but only one can be opened at a time) and a project can also be part of different workspaces. If you k...
Helios
7,180,474
14
I have created an Xtext plugin in eclipse. Every time I launch it as an 'Eclipse Application' via the context menu, I get a few moments grace before the new Eclipse instance crashes. I switch back to the original instance and in the console window I see Root exception: java.lang.OutOfMemoryError: PermGen space I have...
Please add following to the vm parameters in the launch configuration (Run -> Run Configurations) -XX:MaxPermSize=128m That should help.
Helios
6,537,217
12
I notice this question has been asked a few times but I don't really like the solution with two Eclipses in parallel. I just want my Galileo upgraded to Helios with preservation of all settings, plugins and workspaces, without the mumbo-jumbo like copying plugins manually and stuff. I've got the Android plugin, the C/C...
You cannot. You have to download, uncompress and run it without the ubuntu repository. In this scenario you can upgrade without problems ;-) If you want to use Helios through the ubuntu repository you have to wait beyond Maverick (10.10) as you can see here: https://launchpad.net/ubuntu/+source/eclipse
Helios
3,680,250
11
When I use Find/Replace in Eclipse (Helios Service Release 2), it does not find the words above my current location even it reaches to the end of file and I have to set Direction to Backward. I remember the eclipse (maybe indigo) was returning to the beginning of file when it reached to the end. Is there any setting fo...
As you have already found the answer. Just adding the official page which describes this feature in eclipse.There is a wrap search option for this. From the docs:- Select the Wrap Search checkbox if you want the dialog to continue from the top of the file once the bottom is reached (if you find / replace in Select...
Helios
18,737,158
11
I have tried executing this docker command to setup Jaeger Agent and jaeger collector with elasticsearch. sudo docker run \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -e SPAN_STORAGE_TYPE=elasticsearch \ --name=jaeger \ jaegertracing/all-in-one:latest but...
After searching a solution for some time, I found a docker-compose.yml file which had the Jaeger Query,Agent,collector and Elasticsearch configurations. docker-compose.yml version: "3" services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1 networks: - elastic-jaeger ...
Jaeger
51,785,812
18
I'm trying to use OpenTracing.Contrib.NetCore with Serilog. I need to send to Jaeger my custom logs. Now, it works only when I use default logger factory Microsoft.Extensions.Logging.ILoggerFactory My Startup: public void ConfigureServices(IServiceCollection services) { services.AddMvc().SetCompatibilityVersion(Co...
This is a limitation in the Serilog logger factory implementation; in particular, Serilog currently ignores added providers and assumes that Serilog Sinks will replace them instead. So, the solutions is implementaion a simple WriteTo.OpenTracing() method to connect Serilog directly to OpenTracing public class OpenTraci...
Jaeger
56,156,809
18
I instrumented a simple Spring-Boot application with Jaeger, but when I run the application within a Docker container with docker-compose, I can't see any traces in the Jaeger frontend. I'm creating the tracer configuration by reading the properties from environment variables that I set in the docker-compose file. This...
I found the solution to my problem, in case anybody is facing similar issues. I was missing the environment variable JAEGER_SAMPLER_MANAGER_HOST_PORT, which is necessary if the (default) remote controlled sampler is used for tracing. This is the working docker-compose file: version: '2' services: demo: ...
Jaeger
50,173,643
11
There is an existing Spring Boot app which is using SLF4J logger. I decided to add the support of distributed tracing via standard opentracing API with Jaeger as the tracer. It is really amazing how easy the initial setup is - all that is required is just adding two dependencies to the pom.xml: <dependency> ...
https://github.com/opentracing-contrib/java-spring-cloud project automatically sends standard logging to the active span. Just add the following dependency to your pom.xml <dependency> <groupId>io.opentracing.contrib</groupId> <artifactId>opentracing-spring-cloud-starter</artifactId> </dependency> Or use this ht...
Jaeger
50,855,480
11
Can I run non-MPI CUDA applications concurrently on NVIDIA Kepler GPUs with MPS? I'd like to do this because my applications cannot fully utilize the GPU, so I want them to co-run together. Is there any code example to do this?
The necessary instructions are contained in the documentation for the MPS service. You'll note that those instructions don't really depend on or call out MPI, so there really isn't anything MPI-specific about them. Here's a walkthrough/example. Read section 2.3 of the above-linked documentation for various requiremen...
Kepler
34,709,749
13
I need to create a dev dashboard very similar to an existing prod one, and was wondering if there was an easy way of copying the existing dashboard. Any help would be greatly appreciated!
There is a "Save As..." button in the dashboard settings:
Grafana
26,599,176
125
what is default username and password for Grafana for http://localhost:3000/login page ? attaching a home page screenshot also. I want to watch mySql database for through it.
By looking up the docs we can find that the magic combo is admin as username and admin as password. However if you changed some configuration file you should be able to find it there. The default config file can be found here: $WORKING_DIR/conf/defaults.ini and can be overridden using the --config parameter The item in...
Grafana
54,039,604
106
I have on a dashboard, a number of panels (numbering around 6)to display data points chart making queries to dockerised instance of PostgreSQL database. Panels were working fine until very recently, some stop working and report an error like this: pq: could not resize shared memory segment "/PostgreSQL.2058389254" to ...
This is because docker by-default restrict size of shared memory to 64MB. You can override this default value by using --shm-size option in docker run. docker run -itd --shm-size=1g postgres or in docker-compose: db: image: "postgres:11.3-alpine" shm_size: 1g Check this out. More info here.
Grafana
56,751,565
89
Despite these settings, Grafana still requires the use of a password to view Dashboards. Can someone please help me with the correct settings? [auth.anonymous] # enable anonymous access enabled = true [auth.basic] enabled = false
Thanks @Donald Mok for his answer; I just want to make it as clear as possible. In the Grafana interface you can create an organization. After that you can create some dashboards for this organization. So, there is a problem that you need to specify the organization for anonymous users. And it should be a real organiza...
Grafana
33,111,835
89
I'm making a Grafana dashboard and want a panel that reports the latest version of our app. The version is reported as a label in the app_version_updated (say) metric like so: app_version_updated{instance="eu99",version="1.5.0-abcdefg"} I've tried a number of Prometheus queries to extract the version label as a string...
My answer tries to elaborate on Carl's answer. I assume that the GUI layout may have changed a little since 2016, so it took me while to find the "name" option. Assuming you have a metric as follows: # HELP db2_prometheus_adapter_info Information on the state of the DB2-Prometheus-Adapter # TYPE db2_prometheus_adapter_...
Grafana
38,525,891
65
I want to count number of unique label values. Kind of like select count (distinct a) from hello_info For example if my metric 'hello_info' has labels a and b. I want to count number of unique a's. Here the count would be 3 for a = "1", "2", "3". hello_info(a="1", b="ddd") hello_info(a="2", b="eee") hello_info(a="1"...
count(count by (a) (hello_info)) First you want an aggregator with a result per value of a, and then you can count them.
Grafana
51,882,134
63
I need to write a query that use any of the different jobs I define. {job="traefik" OR job="cadvisor" OR job="prometheus"} Is it possible to write logical binary operators?
Prometheus has an or logical binary operator, but what you're asking about here is vector selectors. You can use a regex for this {job=~"traefik|cadvisor|prometheus"}, however that you want to do this is a smell.
Grafana
43,134,060
48
I have no clue what the option "instant" means in Grafana when creating graph with Prometheus. Any ideas?
It uses the query API endpoint rather than the query_range API endpoint on Prometheus, which is more efficient if you only care about the end of your time range and don't want to pull in data that Grafana is going to throw away again.
Grafana
51,728,031
47
I'm using Grafana with Prometheus and I'd like to build a query that depends on the selected period of time selected in the upper right corner of the screen. Is there any variable (or something like that) to use in the query field? In other words, If I select 24hs I'd like to use that data in the query.
There are two ways that I know: You can use the $__interval variable like this: increase(http_requests_total[$__interval]) There is a drawback that the $__interval variable's value is adjusted by resolution of the graph, but this may also be helpful in some situations. This approach should fit your case better: ...
Grafana
47,141,967
38
I need to monitor very different log files for errors, success status etc. And I need to grab corresponding metrics using Prometheus and show in Grafana + set some alerting on it. Prometheus + Grafana are OK I already use them a lot with different exporters like node_exporter or mysql_exporter etc. Also alerting in new...
Take a look at Telegraf. It does support tailing logs using input plugins logparser and tail. To export metrics as prometheus endpoint use prometheus_client output plugin. You also may apply on the fly aggregations. I've found it simpler to configure for multiple log files than grok_exporter or mtail
Grafana
41,160,883
38
I'm attracted to prometheus by the histogram (and summaries) time-series, but I've been unsuccessful to display a histogram in either promdash or grafana. What I expect is to be able to show: a histogram at a point in time, e.g. the buckets on the X axis and the count for the bucket on the Y axis and a column for each...
Grafana v5+ provides direct support for representing Prometheus histograms as heatmap. http://docs.grafana.org/features/panels/heatmap/#histograms-and-buckets Heatmaps are preferred over histogram because a histogram does not show you how the trend changes over time. So if you have a time-series histogram, then use the...
Grafana
39,135,026
34
I try to get Total and Free disk space on my Kubernetes VM so I can display % of taken space on it. I tried various metrics that included "filesystem" in name but none of these displayed correct total disk size. Which one should be used to do so? Here is a list of metrics I tried node_filesystem_size_bytes node_filesys...
According to my Grafana dashboard, the following metrics work nicely for alerting for available space, 100 - ((node_filesystem_avail_bytes{mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{mountpoint="/",fstype!="rootfs"}) The formula gives out the percentage of available space on the poin...
Grafana
57,357,532
33
We are using Grafana 4 and have implemented alert notifications to a slack channel through an Incoming Webhook. The notifications are sent as and wen expected, except that the link in the notification points to the wrong place. For instance, if you take the following test notification: Then I would expect the link in ...
There are a number of options you can add to your ini file to tell Grafana how to build self-referential urls: #################################### Server ############################## [server] # Protocol (http or https) protocol = http # The http port to use http_port = 3000 # The public facing domain name used to...
Grafana
41,282,961
33
I'm trying to write a prometheus query in grafana that will select visits_total{route!~"/api/docs/*"} What I'm trying to say is that it should select all the instances where the route doesn't match /api/docs/* (regex) but this isn't working. It's actually just selecting all the instances. I tried to force it to select ...
May be because you have / in the regex. Try with something like visits_total{route=~".*order.*"} and see if the result is generated or not. Try this also, visits_total{route!~"\/api\/docs\/\*"} If you want to exclude all the things that has the word docs you can use below, visits_total{route!~".*docs.*"}
Grafana
54,813,545
31
I'm displaying Prometheus query on a Grafana table. That's the query (Counter metric): sum(increase(check_fail{app="monitor"}[20m])) by (reason) The result is a table of failure reason and its count. The problem is that the table is also showing reasons that happened 0 times in the time frame and I don't want to displa...
I don't know how you tried to apply the comparison operators, but if I use this very similar query: sum(increase(up[1d])) by (job) I get a result of zero for all jobs that have not restarted over the past day and a non-zero result for jobs that have had instances restart. If I now tack on a != 0 to the end of it, all ...
Grafana
54,762,265
31
I have several dashboards in the Grafana, when I log in to the Grafana, I encounter with the Dashboard Not Found error. I want to set one of the Grafana dashboards as the home page (default page) when I log in to the Grafana.
Grafana v4.6.3 In grafana click on the Grafana Menu, got to > Profile and under preferences you can set the Home Dashboard for yourself. For you organization you'll need to logon as an admin and under Grafana Menu > Main Org > Preferences you can set the home dashboard for your organization. This is for v4.6.3, but i...
Grafana
48,164,754
29
I didn't find a 'moving average' feature and I'm wondering if there's a workaround. I'm using influxdb as the backend.
Grafana supports adding a movingAverage(). I also had a hard time finding it in the docs, but you can (somewhat hilariously) see its usage on the feature intro page: As is normal, click on the graph title, edit, add the metric movingAverage() as per described in the graphite documentation: movingAverage(seriesList, w...
Grafana
27,489,056
29
Because Prometheus topk returns more results than expected, and because https://github.com/prometheus/prometheus/issues/586 requires client-side processing that has not yet been made available via https://github.com/grafana/grafana/issues/7664, I'm trying to pursue a different near-term work-around to my similar proble...
If you're confused by brian's answer: The result of filtering with a comparison operator is not a boolean, but the filtered series. E.g. min(flink_rocksdb_actual_delayed_write_rate > 0) Will show the minimum value above 0. In case you actually want a boolean (or rather 0 or 1), use something like sum (flink_rocksdb_ac...
Grafana
46,697,754
26
I'm playing with grafana and I want to create a panel where I compare data from one app server against the average of all the others except that one. Something like: apps.machine1.someMetric averageSeries(apps.*.not(machine1).someMetric) Can that be done? How?
Sounds like you want to filter a seriesList, you an do that inclusively using the 'grep' function or exclusively using the 'exclude' function exclude(apps.machine*.someMetric,"machine1") and pass that into averageSeries averageSeries(exclude(apps.machine*.someMetric,"machine1")) You can read more about those function...
Grafana
34,214,149
24
I have a InfluxDB dataseries. It stores one information about mulitple machines. I distingsh between these machines with a tag. I can display the information for all three machines at once using a "Group by tag(machine)" clause. the name of the legends is "table.derivative {machine: 1}", "table.derivative {machine: 2}"...
In Grafana, you can use alias patterns. There is a description of alias patterns at the bottom of the metrics tab: In your case, in the Alias By field you would write $tag_machine. Here is an InfluxDb example on the Grafana demo site that uses the Alias By field: https://play.grafana.org/d/000000002/influxdb-templated...
Grafana
42,397,891
23
I am charting data with a Grafana table, and I want to aggregate all data points from a single day into one row in the table. As you can see below my current setup is displaying the values on a per / minute basis. Question: How can I make a Grafana table that displays values aggregated by day? | Day | ...
You can use the summarize function on the metrics panel. Change the query by pressing the + then selecting transform summarize(24h, sum, false) this will aggregate the past 24hr data points into a single point by summing them. http://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.summarize ...
Grafana
42,374,268
23
I am using Grafana Loki and I need to calculate the total number of a certain log message for a specific time interval. For example, I need the total number of log message "some-text" in the period from 12:00:00 to 14:00:00. I just found the following way to count the occurrences of the last minute, something this: cou...
If you're using Grafana Explore to query your logs you can do an instant query and use the time range and global variables. So you can select the time range as seen in the screenshot below and your query would become count_over_time({container="some-container"} |= "some-text"[$__range]) You can check my example in the ...
Grafana
72,607,465
21
On my ActiveMQ I have some Queues, which end with .error. On a Grafana Dashboard I want to list all queues without these .error-queues. Example: some.domain.one some.domain.one.error some.domain.two some.domain.two.error To list all queues I use this query: org_apache_activemq_localhost_QueueSize{Type="Queue",Destinat...
You can use a negative regex matcher: org_apache_activemq_localhost_QueueSize{Type="Queue",Destination=~"some.domain.*",Destination!~".*\.error"}
Grafana
40,277,612
20
We graph fast counters with sum(rate(my_counter_total[1m])) or with sum(irate(my_counter_total[20s])). Where the second one is preferrable if you can always expect changes within the last couple of seconds. But how do you graph slow counters where you only have some increments every couple of minutes or even hours? Hav...
That's a correct way to do it. You can also use increase() which is syntactic sugar for using rate() that way. Can someone explain how the range selector This is only used by Prometheus, and indicates what data to work over. the Step and Resolution settings in grafana influence each other? This is used on the Graf...
Grafana
38,659,784
20
Using grafana with influxdb, I am trying to show the per-second rate of some value that is a counter. If I use the non_negative_derivative(1s) function, the value of the rate seems to change dramatically depending on the time width of the grafana view. I'm using the last selector (but could also use max which is the ...
If you want per second results that don't vary, you'll want to GROUP BY time(1s). This will give you accurate perSecond results. Consider the following example: Suppose that the value of the counter at each second changes like so 0s → 1s → 2s → 3s → 4s 1 → 2 → 5 → 8 → 11 Depending on how we group the sequence abov...
Grafana
38,016,051
20
I have a grafana docker image which have hawkular-datasource pre-configured using configuration files. After after running grafana instance, I have a json given by teammate, which can be imported inside grafana and that json file creates dashboard when imported. How do I make that dashboards appear by default in Graf...
You should put a YAML file pointing to the JSON files in that folder. For example write /etc/grafana/provisioning/dashboards/local.yml: apiVersion: 1 providers: - name: 'default' orgId: 1 folder: '' type: file disableDeletion: false updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboard...
Grafana
54,813,704
19
I have a counter that measures the number items sold every 10 minutes. I currently use this to track the cumulative number of items: alias(integral(app.items_sold), 'Today') And it looks like this: Now, what I want to do to show how well we were are doing TODAY vs best, avg (or may median) worst day we've had for the...
The answer was to just flip the order to the function calls: (maxSeries before integral) Thanks to turner on the grafana@groups.io board for the answer alias(maxSeries(integral(timeStack(app.items_sold, '1d', 0, 90))),'Max') alias(averageSeries(integral(timeStack(app.items_sold, '1d', 0,90))), 'Avg') alias(minSeries(in...
Grafana
29,264,515
19
I am sending json logs to loki and visualizing in grafana. Initially, my logs looked like as following. { "log": "{\"additionalDetails\":{\"body\":{},\"ip\":\"::ffff:1.1.1.1\",\"params\":{},\"query\":{},\"responseTime\":0,\"userAgent\":\"ELB-HealthChecker/2.0\"},\"context\":\"http\",\"endpoint\":\"/healthz\",...
You can create a "status" custom variable with values like 200, 401, 403, 404, etc, and use the variable in the LogQL, like in the following example: {app="awesome-loki-logs-with-grafana"} | json | statusCode=$status
Grafana
71,002,529
18
Small question regarding Spring Boot, some of the useful default metrics, and how to properly use them in Grafana please. Currently with a Spring Boot 2.5.1+ (question applicable to 2.x.x.) with Actuator + Micrometer + Prometheus dependencies, there are lots of very handy default metrics that come out of the box. I am ...
UPD 2022/11: Recently I've had a chance to work with these metrics myself and I made a dashboard with everything I say in this answer and more. It's available on Github or Grafana.com. I hope this will be a good example of how you can use these metrics. Original answer: count and sum are generally used to calculate an ...
Grafana
67,964,176
18
I am new to Prometheus and Grafana. My primary goal is to get the response time per request. For me it seemed to be a simple thing - but whatever I do I do not get the results I require. I need to be able to analyse the service latency in the last minutes/hours/days. The current implementation I found was a simple SUMM...
Your query is correct. The result will be NaN if there have been no queries in the past minute.
Grafana
47,305,424
18
I have a Grafana dashboard with template variables for services and instances. When I select a service how can I make it filter the second template variable list based on the first?
You can reference the first variable in the second variables query. I'm not certain if there is a way using the label_values helper though. First variable query: up regex: /.*app="([^"]*).*/ Second variable: query: up{app="$app"} regex: /.*instance="([^"]*).*/
Grafana
41,773,162
18
I'm trying to figure out a way to create a data-source plugin which can communicate with an external REST API and provide relevant data to draw a panel. Anyone with previous experience?
The Simple JSON Datasource does roughly what you're proposing, and would definitely be a good base for you to start from. There is also documentation on datasource plugins available.
Grafana
39,608,362
18
I am in the processing of migrating my panels from using the SQL syntax (from InfluxDB version 1.X) to the new influx syntax (InfluxDB version 2). There is an issue with the labels of the data. It includes the attributes that I used to filter it. For example, if I select data from a range that contains 2 days, it split...
After hours of trial and error, I was able to produce a working solution. I imagine that other users may stumble upon the same issue, I will therefore not delete the question and instead provide my solution. I basically had to map the required fields and tags and assign the desired label, instead of just mapping the va...
Grafana
68,122,202
17
I'm trying to understand helm and I wonder if someone could ELI5 to me something or help me with something. So i did run below: helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ Then I installed kube-prometheus by using below: helm install coreos/kube-prometheus --name kube-prometheus -f v...
You can find a good example of how to do this in the charts for prometheus-operator here: https://github.com/helm/charts/tree/master/stable/prometheus-operator/templates/grafana It is a ConfigMapList that gets all JSONs from a given directory and stores them into ConfigMaps which are read by Grafana. {{- $files := .Fil...
Grafana
55,830,850
17
As the Grafana Dashboard comes with Default black back ground color. It is possible to change the color to some other color of user choice?
What version are you using? If you're using > v3.x, you'll be able to set a default theme for the main organisation. Set it to the light theme and you're good.
Grafana
41,006,070
17
I have successfully running a grafana instance on my server. It runs on http without a problem. Now I want to switch from http to https. My grafana.ini is shown bellow: #################################### Server #################################### [server] # Protocol (http or https) protocol = https # The ip address...
The above configuration may have a problem: after changing the grafana.ini file the "grafana-server" service will not start again. Here's how I solved my problem: Change grafana.ini as mentioned above. Copy the certificate files (pem, crt and key) to /etc/grafana. Change the file permissions of the certificate files t...
Grafana
39,956,790
17
I have a Grafana dashboard panel configured to render the results of a Prometheus query. There are a large number of series returned by the query, with the legend displayed to the right. If the user is looking for a specific series, they have to potentially scroll through all of them, and it's easy to miss the one they...
As far as I know, You can only use the function sort() to sort metrics by value. According to this PR, Prometheus does not intend to provide the function sort_by_label(). According to this Issue, Grafana displays the query results from Prometheus without sorting. According to this Issue, Grafana supports sorting by va...
Grafana
64,395,442
16
I have configured grafana dashboard to monitor promethus metrics for some of the spring boot services. I have a single panel and a prom query for every service on it. Now I want to add alerts for each on of those queries. But I couldn't find a way to add multiple alerts on single panel. I could add only only for one of...
You can specify the query that the alert threshold is evaluating within the 'conditions' but it will still be just one alert. As such your Alert message won't include anything to distinguish which specific query condition triggered the alert, it's just whatever text is in the box (AFAIK there's not currently any way to...
Grafana
63,245,770
16
I am exploring grafana for my log management and system monitoring. I found kibana is also used for same process. I just don't know when to use kibana and when to use grafana and when to use zabbix?
Zabbix - complex monitoring solution including data gathering, data archiving (trends, compaction,...), visualizer with dashboards, alerting and some management support for alerts escalations. (have a look at collectd, prometheus, cacti. They are all able to gather data) Grafana - visualizer of data. It can read data a...
Grafana
40,882,040
16
We have different type of logs for one and the same application. Some are coming from our application which logs in a JSON format and others are different types of log messages. For example these 3 log lines: "{\"written_at\": \"2022-03-30T07:51:04.934Z\", \"written_ts\": 1648626664934052000, \"msg\": \"Step 'X' starte...
Not sure if you managed to get an answer to this, as I'm looking to see if this is possible in a single query, however you can do this with multiple queries… For the JSON rows | json log="log" | line_format "{{.log}}" | json | line_format "{{.msg}}" | __error__ != "JSONParserErr" # … more processing For the non-JSON ...
Grafana
71,675,210
15
In https://github.com/grafana/loki/issues/4249 I found interesting screenshot. On this screenshot I see that log level and message are displayed bold with white text and other metadata (collected from log message) displayed on separate line with grey color. I have searched docs and haven't found how it's possible to a...
Short answer: I found that there isn't such UI function in Grafana UI. But there's two features that can help you achieve such result: Line formating - allows you to show only selected parts of message ANSI escape sequence rendering - that allows you to change font settings (bold/italic/color) Long answer: Here's my...
Grafana
69,761,162
15
Is there a way to send logs to Loki directly without having to use one of it's agents? For example, if I have an API, is it possible to send request/response logs directly to Loki from an API, without the interference of, for example, Promtail?
Loki HTTP API Loki HTTP API allows pushing messages directly to Grafana Loki server: POST /loki/api/v1/push /loki/api/v1/push is the endpoint used to send log entries to Loki. The default behavior is for the POST body to be a snappy-compressed protobuf message: Protobuf definition Go client library Alternatively, if...
Grafana
67,316,535
15
I am a little unclear on when to exactly use increase and when to use sum_over_time in order to calculate a periodic collection of data in Grafana. I want to calculate the total percentage of availability of my system. Thanks.
The "increase" function calculates how much a counter increased in the specified interval. The "sum_over_time" function calculates the sum of all values in the specified interval. Suppose you have the following data series in the specified interval: 5, 5, 5, 5, 6, 6, 7, 8, 8, 8 Then you would get: increase = 8-5 = 3 s...
Grafana
63,289,864
15
My password once worked, but I don't remember if I changed it or not. However, I can't reset it. I tried with no success: kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo > DpveUuOyxNrandompasswordYuB5Fs2cEKKOmG <-- does not work (anymore?) PS: I did not set...
Ok found. Best way is to run grafana-cli inside grafana's pod. namespace=monitoring kubectl exec --namespace $namespace -it $(kubectl get pods --namespace $namespace -l "app.kubernetes.io/name=grafana" -o jsonpath="{.items[0].metadata.name}") -- grafana cli admin reset-admin-password yourNewPasswordHere INFO[01-21|10:...
Grafana
59,838,690
15
I am setting up Grafana in Fargate using Docker. Once the Grafana container is active, is there an endpoint I can call that Fargate could use to determine if the container is "healthy" or not? For example: http://grafana/healthy or http://grafana/status Thanks!
Returns health information about Grafana GET /api/health It is documented: https://grafana.com/docs/grafana/latest/http_api/other/#returns-health-information-about-grafana Or undocumented (so use it only if you understand how it works and what are consequences): GET /healthz https://github.com/grafana/grafana/pull/...
Grafana
66,535,307
14
I have recently set up Grafana with InfluxDB. I'd like to show a panel that indicates how long it has been since an event took place. Examples: Server last reported in: 33 minutes ago Last user sign up: 17 minutes ago I can get a single metric pretty easily with the following code: SELECT time, last("duration") as la...
Since Grafana(4.6.0) this is now possible with singlestat panels. GoTo the Options-Tab Select Value -> Stat -> Time of last point Select Value -> Stat -> Unit -> Date & time -> From Now
Grafana
35,640,978
14
I have a Spring boot app throwing out open metric stats using micrometer. For each of my HTTP endpoints, I can see the following metric which I believe tracks the number of requests for the given endpoint: http_server_requests_seconds_count My question is how do I use this in a Grafana query to present the number numbe...
rate(http_client_requests_seconds_count{}[1m]) will provide you the number of request your service received at a per-second rate. However by using [1m] it will only look at the last minute to calculate that number, and requires that you collect samples at a rate quicker than a minute. Meaning, you need to have collecte...
Grafana
66,282,512
13
I have below labels in prometheus, how to create wildcard query while templating something like “query”: “label_values(application_*Count_Total,xyx)” . These values are generated from a Eclipse Microprofile REST-API application_getEnvVariablesCount_total application_getFEPmemberCount_total application_getLOBDetailsCoun...
Prometheus treats metric names the same way as label values with a special label - __name__. So the following query should select all the values for label xyx across metrics with names matching application_.*Count_total regexp: label_values({__name__=~"application_.*Count_total"}, xyx)
Grafana
59,684,225
13
I'm looking at Prometheus metrics in a Grafana dashboard, and I'm confused by a few panels that display metrics based on an ID that is unfamiliar to me. I assume that /kubepods/burstable/pod99b2fe2a-104d-11e8-baa7-06145aa73a4c points to a single pod, and I assume that /kubepods/burstable/pod99b2fe2a-104d-11e8-baa7-0614...
OK, now that I've done some digging around, I'll attempt to answer all 3 of my own questions. I hope this helps someone else. How to do I map this ID to the pod name I see when I run kubectl get pods? Given the following, /kubepods/burstable/pod99b2fe2a-104d-11e8-baa7-06145aa73a4c, the last bit is the pod UID, and can ...
Grafana
49,035,724
13
Use helm installed Prometheus and Grafana on minikube at local. $ helm install stable/prometheus $ helm install stable/grafana Prometheus server, alertmanager grafana can run after set port-forward: $ export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus,component=server" -o jsonpath="{.items[0].me...
In the HTTP settings of Grafana you set Access to Proxy, which means that Grafana wants to access Prometheus. Since Kubernetes uses an overlay network, it is a different IP. There are two ways of solving this: Set Access to Direct, so the browser directly connects to Prometheus. Use the Kubernetes-internal IP or domai...
Grafana
48,338,122
13
What is the best-practice in terms of migrating grafana (configuration, dashboards etc.) to a a newer version ? I want to migrate a v3 grafana installation to a new server which will be running the v4 codebase with alerting! According to the docs, grafana v4 will automatically update the database schema once you start...
That should do it. If your using sqlite you can just copy the data/grafana.db file to the new server.
Grafana
41,009,392
13
I tried to obtains these measurements from prometheus: increase(http_server_requests_seconds_count{uri="myURI"}[10s]) increase(http_server_requests_seconds_count{uri="myURI"}[30s]) rate(http_server_requests_seconds_count{uri="myURI"}[10s]) rate(http_server_requests_seconds_count{uri="myURI"}[30s]) Then I run a python...
Prometheus calculates increase(m[d]) at timestamp t in the following way: It fetches raw samples stored in the database for time series matching m on a time range (t-d .. t]. Note that samples at timestamp t-d aren't included in the time range, while samples at t are included. It is expected that every selected time s...
Grafana
70,835,778
12
I want to exclude mulitple app groups from my query... Not sure how to go about it.. My thoughts are like this count(master_build_state{app_group~! "oss-data-repair", "pts-plan-tech-solution", kubernets_namespace = "etc"} ==0) I do not want to include those two app_groups, but am not sure how to implement in PromQL. ...
count(master_build_state{app_group !~ "(oss-data-repair|pts-plan-tech-solution)", kubernets_namespace="etc"} ==0)
Grafana
68,681,720
12
I went through the PromQL docs and found rate little bit confusing. Then I tried one query from Prometheus query dashboard and found below given results Time Count increase rate(count[1m]) 15s 4381 0 0 30s 4381 0 0 45s 4381 0 0 1m 4381 0 0 15s 4381 0 0 30s 4402...
The "increase" function calculates how much some counter has grown and the "rate" function calculates the amount per second the measure grows. Analyzing your data I think you used [30s] for the "increase" and [1m] for the "rate" (the correct used values are important to the result). Basically, for example, in time 2m w...
Grafana
66,674,880
12
In my project we use influx dB and Grafana for our log and other analysis which is running on an Ubuntu machine. Now recently due to a migration process, the ports were blocked like 3000(for Grafana) and 8086 (for influx dB) which will be remain blocked for some security reason. So, I am unable to connect them through ...
I figure it out by some research, thought I can help the community if someone same searching for the answer. The default folder of the dashboard is /var/lib/grafana. If you navigate to the folder, you will find a file name grafana.db. Download this file to your local machine or any machine which you want. Please downlo...
Grafana
65,860,003
12
I would like to add an annotation on all panels (graphs) in the Grafana dashboard. I could add annotations manually one-by-one on all panels -- but I hope there is a better way how to do it although I didn't find any information in the official documentation. I suppose I can write a script using Grafana API to create a...
I struggled with the same, but found the answer here: https://stackoverflow.com/a/50416641/3803228 In short, you have to go to your dashboard settings, and in the "annotations" tab, create a new query... that one will automatically display the annotation in all the dashboard panels. This is the part that worked to me f...
Grafana
62,422,980
12
I'm trying to show system uptime as DD-HH-MM-SS format, doing it using common code wouldn't be an issue but I'm doing it using Prometheus (PromQL) and Grafana only, here's the PromQL query: time()-process_start_time_seconds{instance="INSTANCE",job="JOB"} I achieved the basic output I wanted, it shows me the process lif...
You can achieve this using "Unit" drop-down in the visualization section and select your unit as duration with the hh:mm:ss format, as you can see in the screenshot.
Grafana
60,757,793
12
There's an article "Tracking Every Release" which tells about displaying a vertical line on graphs for every code deployment. They are using Graphite. I would like to do something similar with Prometheus 2.2 and Grafana 5.1. More specifically I want to get an "application start" event displayed on a graph. Grafana anno...
The simplest way to do this is via the same basic approach as in the article, by having your deployment tool tell Grafana when it performs a deployment. Grafan has a built-in system for storing annotations, which are displayed on graphs as vertical lines and can have text associated with them. It would be as simple as ...
Grafana
50,415,659
12
I have 20 plus dashboards in Grafana hosting at Server1. We acquired another server and we did installed same version of Grafana on Server2 machine. I want to know is this possible that i can completely clone Server-1 Grafana instance along with all dashboards to Server2? As of now Grafana only supports one by one dash...
If you are using the built-in sqlite3 database, then you can indeed just copy your data directory and conf/custom.ini to the new server and that will include all your dashboards, plugins, etc. In that setup the database is contained in data/grafana.db under your grafana installation.
Grafana
42,036,663
12
I am following this tutorial link to create a grafana plugin. But when I copy this code link from the tutorial to my test server(without the dist/ folder) and run npm install npm doesn’t create a new dist/ folder instead it creates a node_modules folder. Am I missing a step here or am I understanding something incorrec...
You are missing running grunt default task You should run: npm install (which installs your dependencies), followed by a grunt (which copies src files to dist as you can see in the Gruntfile.js copy:src_to_dist task) So in short just run: $ npm install && grunt
Grafana
37,975,500
12
env: kubernetes provider: gke kubernetes version: v1.13.12-gke.25 grafana version: 6.6.2 (official image) grafana deployment manifest: apiVersion: apps/v1 kind: Deployment metadata: name: grafana namespace: monitoring spec: replicas: 1 selector: matchLabels: app: grafana template: metadata: ...
I recreated your deployment with appropriate PVC and noticed that grafana pod was failing. Output of command: $ kubectl get pods -n monitoring NAME READY STATUS RESTARTS AGE grafana-6466cd95b5-4g95f 0/1 Error 2 65s Further investigation pointed the same errors as yours: mkdir: can't create directory '/var/lib/graf...
Grafana
60,727,107
11
I have several metrics with the label "service". I want to get a list of all the "service" levels that begin with "abc" and end with "xyz". These will be the values of a grafana template variable. This is that I have tried: label_values(service) =~ "abc.*xyz" However this produces a error Template variables could not b...
This should work (replacing up with the metric you mention): label_values(up{service=~"abc.*xyz"}, service) Or, in case you actually need to look across multiple metrics (assuming that for some reason some metrics have some service label values and other metrics have other values): label_values({__name__=~"metric1|met...
Grafana
55,958,636
11
I have used a variable in grafana which looks like this: label_values(some_metric, service) If the metric is not emitted by the data source at the current time the variable values are not available for the charts. The variable in my case is the release name and all the charts of grafana are dependent on this variable...
I'd suggest query_result(count by (somelabel)(count_over_time(some_metric[$__range]))) and then use regular expressions to extract out the label value you want. That I'm using count here isn't too important, it's more that I'm using an over_time function and then aggregating.
Grafana
52,778,031
11
When i make a table panel and go to "Options" tab, columns parameter set to Auto: Columns and their order are determined by the data query. Is there a doc on how write prometheus queries for grafana tables? My prometheus data is a metric with 2 labels my_col and my_row: my_metric{instance="lh",job="job",my_col="1",my_...
After some experimentations in Grafana 9.1.1, I have obtained a way to construct a table like you have described with prometheus metric like that. Here are Grafana transform functions you will need: Labels to fields This function separate the labels in the metric to columns. Set Mode to Columns Set Labels to be only...
Grafana
52,163,689
11
I did a Grafana-docker deployment with persistent storage as said in their GitHub for doing tests for my company. I did exactly as they say (I paste) and it works: # create /var/lib/grafana as persistent volume storage docker run -d -v /var/lib/grafana --name grafana-storage busybox:latest # start grafana docker run \...
I would recommend the following solution: $ docker volume create grafana-storage grafana-storage $ docker volume ls DRIVER VOLUME NAME local grafana-storage This is created in /var/lib/docker/volumes/grafana-storage on UNIX. Then you can start your grafana container and mount ...
Grafana
45,730,213
11
I want to label series by hostname + metric name. I know I can use aliasByNode(1) to do first part and aliasByMetric() to do the second. Any ideas how can I merge those two functions in a single metric?
aliasByNode can take multiple arguments. aliasByNode(apps.fakesite.web_server_01.counters.requests.count, 2,5) returns web_server_01.count. The Grafana query editor for Graphite does not support this but if you toggle edit mode then you can edit the raw query. After editing it, you can toggle back.
Grafana
38,281,290
11
I'm trying to set up graphite to work with grafana in docker based on this project : https://github.com/kamon-io/docker-grafana-graphite and when I run my dockerfile I get 403 Forbidden error for nginx. my configurations for nginx are almost the same as the project's configurations. I run my dockerfiles on a server an...
That's because you are hitting the first location block and the index file is not found.
Grafana
27,303,967
11
Let's take this processor as an example: a CPU with 2 cores and 4 threads (2 threads per core). From what I've read, such a CPU has 2 physical cores but can process 4 threads simultaneously through hyper threading. But, in reality, one physical core can only truly run one thread at a time, but using hyper threading, th...
This gets very complicated. So k8s doesn't actually manage this it just provides a layer on top of the underlying container runtime (docker, containerd etc). When you configure a container to use 100 millicore k8's hands that down to the underlying container runtime and the runtime deals with it. Now once you start goi...
Grafana
71,944,390
10
I need a way to add a Dropdown menu ( or similar solution ) to show the metrics for only one cpu ( cpu 1 or cpu 0 ). Is this possible? The metric is node_cpu_seconds_total
Create a custom variable named "cpu" with values 0 and 1 in Dashboard settings > Variables > New Create the graph panel using the cpu variable (use the ":pipe" suffix to enable the use of 0 and 1 options at the same time) The CPU can be selected in the dropdown menu
Grafana
67,263,623
10
I would like a Grafana variable that contains all the Prometheus metric names with a given prefix. I would like to do this so I can control what graphs are displayed with a drop down menu. I'd like to be able to display all the metrics matching the prefix without having to create a query for each one. In the Grafana do...
In promql, you can select metrics by name by using the internal __name__ label: {__name__=~"mysql_.*"} And then, you can reuse it to extract the metrics name using query label_values(): label_values({__name__=~"mysql_.*"},__name__) This will populate your variable with metrics name starting with mysql_. You can get t...
Grafana
60,874,653
10
I am trying to create a table/chart in Grafana showing the total number of unique users who have logged in to a given application over a given time range (e.g. last 24 hours). I have a metric, app_request_path which records the number of requests hitting a specific path per minute: app_request_count{app="my-app", path=...
count without (username)(app_request_count) count_values is for metric values, count is for time series. It's also not advised to have something like usernames as label values as they tend to be high cardinality. They may also be PII, which could have legal implications.
Grafana
59,935,902
10
In Grafana I have a drop down for variable $topic with values "topic_A" "topic_B" "topic_A" is selected so $topic = "topic_A" I want to query prometheus using function{topic=$topic} and that works fine. How would I implement function{topic="$topic" + "_ERROR"} (this fails) where what I want to query would be "topic_...
UPDATE 2020-08-17: There is a new syntax for Grafana variables, new format is to use curly braces after dollar sign: function{topic=~"${topic}_ERROR"} Double brackets syntax is deprecated and will be deleted soon. Also now you can define the format of the variable, which may help to solve some spacial characters issue...
Grafana
59,792,809
10
I'm trying to use a customisation file (custom.ini) for my Grafana installation. Unfortunately this isn't working. What I have done: Installed a VM with CentOS 7 Added the Grafana Yum Repo as described in the official documentation Installed Grafana with yum install grafana Then I created a simple customisation file ...
...the parameter is /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini, also the custom.ini is not called at all. ... You were correct at this point in your comments: a custom.ini file is simply not used. The /etc/grafana/grafana.ini file is the custom config file for your platform (Yum repo = rpm package). S...
Grafana
50,925,016
10
Is there a way to round a decimal value in grafana? round() and ceil() functions gets an "instant-vector", not a numeric value, and for example, adding a query like ceil(1/15) will return 0.
It depends what you're using to display the data, for example a single stat or gauge you'll find the 'Decimals' option in Grafana, for graphs it's in the 'Axes' options. You don't need to do this in the query for the metric.
Grafana
50,634,445
10
I have install the Grafan in my Kubenernetes 1.9 cluster. When I access with my ingress URL (http://sample.com/grafana/ ) getting the first page. After that javascript, css download not adding /grafana to the URL. here is my ingress rule: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: grafana-ingress-v...
Your ingress rule is correct and nginx creates correct virtual host to forward traffic to grafana's service (I left only needed strings to show): server { server_name sample.com; listen 80; listen [::]:80; set $proxy_upstream_name "-"; location ~* ^/grafana/(?<baseuri>.*) { set $proxy_ups...
Grafana
48,410,293
10
Use Helm installed Prometheus and Grafana in a kubernetes cluster: helm install stable/prometheus helm install stable/grafana It has an alertmanage service. But I saw a blog introduced how to setup alertmanager config with yaml files: http://blog.wercker.com/how-to-setup-alerts-on-prometheus Is it possible to use t...
The alerts and rules keys in the serverFiles group of the values.yaml file are mounted in the Prometheus container in the /etc/config folder. You can put in there the configuration you want (for example take inspiration by the blog post you linked) and it will be used by Prometheus to handle the alerts. For example, a ...
Grafana
48,374,858
10
I have different metrices in prometheus counter_metrics a, couneter_metrices b and I want a singlestat for the count of all the different request metrics. How am I able to fetch this? (sum(couneter_metrics{instance="a,job="b"}))+
For the singlestat panel, you can just sum the two metrics and then add them together. Here is an example with two different metrics: sum(prometheus_local_storage_memory_series) + sum(counters_logins) Recommended reading, just in case you are doing anything with rates as well: https://www.robustperception.io/rate-the...
Grafana
45,343,371
10
I have experienced using Kibana before. However this time, I'd like to try using Grafana. Does my experience guarantee that I can learn Grafana easily? Or is it a whole lot different from Kibana? Please correct me if I'm wrong but so far, according to my research, both are for logs. Grafana is more of visualization on...
Grafana is a fork of Kibana but they have developed in totally different directions since 2013. 1. Logs vs Metrics Kibana focuses more on logs and adhoc search while Grafana focuses more on creating dashboards for visualizing time series data. This means Grafana is usually used together with Time Series databases like ...
Grafana
42,781,010
10
I want to send log events to Loggly as JSON objects with parameterized string messages. Our project currently has a lot of code that looks like this: String someParameter = "1234"; logger.log("This is a log message with a parameter {}", someParameter); We're currently using Logback as our SLF4J backend, and Logback's ...
There is a JSON logstash encoder for Logback, logstash-logback-encoder
Loggly
22,615,311
29
I'd like to set up Loggly to run on AWS Elastic Beanstalk, but can't find any information on how to do this. Is there any guide anywhere, or some general guidance on how to start?
This is how I do it, for papertrailapp.com (which I prefer instead of loggly). In your /ebextensions folder (see more info) you create logs.config, where specify: container_commands: 01-set-correct-hostname: command: hostname www.example.com 02-forward-rsyslog-to-papertrail: # https://papertrailapp.com/syst...
Loggly
11,254,908
16
I would like find free alternative for loggly for write my logs with application. Maybe there are open source alternative or free but he need deployment to my VM (Azure).
If you are ready to setup your own server, you can use Splunk logstash graylog For me the splunk seems the easiest to setup. If you don't want to setup your server, you need to use free plans in loggly-like services. That usually means maximum monthly limit you can send there and short retention (for how long your d...
Loggly
28,809,095
16
I am finding it hard to understand the process of Naive Bayes, and I was wondering if someone could explain it with a simple step by step process in English. I understand it takes comparisons by times occurred as a probability, but I have no idea how the training data is related to the actual dataset. Please give me an...
The accepted answer has many elements of k-NN (k-nearest neighbors), a different algorithm. Both k-NN and NaiveBayes are classification algorithms. Conceptually, k-NN uses the idea of "nearness" to classify new entities. In k-NN 'nearness' is modeled with ideas such as Euclidean Distance or Cosine Distance. By contrast...
DataSet
10,059,594
576
DataSet and DataTable both implement IDisposable, so, by conventional best practices, I should call their Dispose() methods. However, from what I've read so far, DataSet and DataTable don't actually have any unmanaged resources, so Dispose() doesn't actually do much. Plus, I can't just use using(DataSet myDataSet...) b...
Here are a couple of discussions explaining why Dispose is not necessary for a DataSet. To Dispose or Not to Dispose ?: The Dispose method in DataSet exists ONLY because of side effect of inheritance-- in other words, it doesn't actually do anything useful in the finalization. Should Dispose be called on DataTable an...
DataSet
913,228
218
How do I convert data from a Scikit-learn Bunch object to a Pandas DataFrame? from sklearn.datasets import load_iris import pandas as pd data = load_iris() print(type(data)) data1 = pd. # Is there a Pandas method to accomplish this?
Manually, you can use pd.DataFrame constructor, giving a numpy array (data) and a list of the names of the columns (columns). To have everything in one DataFrame, you can concatenate the features and the target into one numpy array with np.c_[...] (note the []): import numpy as np import pandas as pd from sklearn.datas...
DataSet
38,105,539
172
When using R it's handy to load "practice" datasets using data(iris) or data(mtcars) Is there something similar for Pandas? I know I can load using any other method, just curious if there's anything builtin.
Since I originally wrote this answer, I have updated it with the many ways that are now available for accessing sample data sets in Python. Personally, I tend to stick with whatever package I am already using (usually seaborn or pandas). If you need offline access, installing the data set with Quilt seems to be the onl...
DataSet
28,417,293
145
I currently use a DataTable to get results from a database which I can use in my code. However, many example on the web show using a DataSet instead and accessing the table(s) through the collections method. Is there any advantage, performance wise or otherwise, of using DataSets or DataTables as a storage method for S...
It really depends on the sort of data you're bringing back. Since a DataSet is (in effect) just a collection of DataTable objects, you can return multiple distinct sets of data into a single, and therefore more manageable, object. Performance-wise, you're more likely to get inefficiency from unoptimized queries than...
DataSet
2,250
143
This is possibly a simple question, but I do not know how to order columns alphabetically. test = data.frame(C = c(0, 2, 4, 7, 8), A = c(4, 2, 4, 7, 8), B = c(1, 3, 8, 3, 2)) # C A B # 1 0 4 1 # 2 2 2 3 # 3 4 4 8 # 4 7 7 3 # 5 8 8 2 I like to order the columns by column names alphabetically, to achieve # A B C #...
You can use order on the names, and use that to order the columns when subsetting: test[ , order(names(test))] A B C 1 4 1 0 2 2 3 2 3 4 8 4 4 7 3 7 5 8 2 8 For your own defined order, you will need to define your own mapping of the names to the ordering. This would depend on how you would like to do this, but swapp...
DataSet
7,334,644
121
I've been working for quite a while now with LINQ. However, it remains a bit of a mystery what the real differences are between the mentioned flavours of LINQ. The successful answer will contain a short differentiation between them. What is the main goal of each flavor, what is the benefit, and is there a performance ...
all of them are LINQ - Language Integrated Query - so they all share a lot of commonality. All these "dialects" basically allow you to do a query-style select of data, from various sources. Linq-to-SQL is Microsoft's first attempt at an ORM - Object-Relational Mapper. It supports SQL Server only. It's a mapping techno...
DataSet
2,443,836
110
I'm currently learning TensorFlow but I came across a confusion in the below code snippet: dataset = dataset.shuffle(buffer_size = 10 * batch_size) dataset = dataset.repeat(num_epochs).batch(batch_size) return dataset.make_one_shot_iterator().get_next() I know that first the dataset will hold all the data but what sh...
Update: Here is a small collaboration notebook for demonstration of this answer. Imagine, you have a dataset: [1, 2, 3, 4, 5, 6], then: How ds.shuffle() works dataset.shuffle(buffer_size=3) will allocate a buffer of size 3 for picking random entries. This buffer will be connected to the source dataset. We could image ...
DataSet
53,514,495
102
I have a dataset with 11 columns with over a 1000 rows each. The columns were labeled V1, V2, V11, etc.. I replaced the names with something more useful to me using the "c" command. I didn't realize that row 1 also contained labels for each column and my actual data starts on row 2. Is there a way to delete row 1 and d...
Keep the labels from your original file like this: df = read.table('data.txt', header = T) If you have columns named x and y, you can address them like this: df$x df$y If you'd like to actually delete the first row from a data.frame, you can use negative indices like this: df = df[-1,] If you'd like to delete a colu...
DataSet
7,541,610
102