When I mark as false positive or resolved some issues, the total number of issues is not decremented. Is that behavior normal? If so, is there a way to decrease this number according to the number of marked issues?
I'm using SonarQube 4.5.4 (LTS).
This behavior is normal.
When you resolve (mark False Positive, Won't Fix, or Fixed) an issue the numbers in your dashboard won't reflect that resolution until after the next analysis. That's because those dashboard numbers are Metrics, and metrics aren't updated on the fly - only during analysis.
However, you should see the counts on the Issues page update immediately. Those numbers are calculated on the fly based on the issue set that matches the current query.
Related
I am having a problem keeping my Gilt Replacement Rate slider continuing to add new animals to my model. I have added in a giltQuarantine delay of 8 weeks just after the source block, which helps to visualize how the gilt replacement rate is working.
Everything is working, initially; however, after several weeks, the giltQuarantine delay drops to
0, and no new gilts enter the herd. The Gilt Replacement Rate adds the desired amount to the model, each week, with no stop time listed.
At around 30 weeks, the number of agents in the giltQuarantine delay begins to
decline and finally becomes 0, while the number of sows in the system is only 167. It should be steadily increasing to 1000 sows.
I cannot see why this is happening, as I should have a consistent supply of gilts
entering the herd each week, which the variable giltReplacement says is happening (see Model running at 54 weeks (screenshot 4)).
I also tried increasing the Gilt Replacement Rate, which worked for several weeks,
but then also declined as the number of sows in the system reached 1024. I want my herd size to remain stable at 1000.
Is there any reason that would be causing this decline in replacement animals?
Probably because you limit the total number of arrivals in enterHerd to breedingHerd. Remove the limit and test it.
Also, you can see current rates and other charactistics of flow chart blocks by clicking on them at runtime. Maybe that helps you pinpoint the issue further.
if nothing works, simplify your setup. It is already fairly complex. If you run into this issue now without knowing what causes it, it shows that you do not follow a good modelling approach (add 1 tiny feature, test everything, repeat) :)
I'm building a Grafana dashboard with some Stat panels that show average, minimum, and maximum time values (see below) for specific fields in my database. I'm storing the data in seconds and setting the value's units to seconds after which the panel displays the time in weeks, days, hours, etc. For the sake of consistency, I would like everything to be shown in days but I haven't been able to find a way to force units for the output value. If it's possible to do this, could someone please point me to some docs, or something that could show me which configurations to make in my panels?
So far, I've tried (without success):
Configure each panel to use units of days
The result of this was that everything showed up in years, etc.
Configure each panel to create a new field by performing a binary calculation where I converted from seconds to days and then I updated the units to be days
The result was that the values were not changed at all -> instead of showing X days, or whatever, it just showed the value in seconds without the units. I'm not sure what I messed up there, but it didn’t change anything.
I found this link that discusses setting a time range for queries
This didn’t end up being useful for what I was trying to do because it was actually geared towards changing the query to a specific date range rather than the output.
I looked through the transformations documentation, stat panel documentation, and a few other panel documentation pages in an effort to see if there was any information on how to do it but I was unable to find anything on forcing the output value to use a specific unit.
Edit:
So I kept messing around with the dashboard and got a solution that works - i.e. it's a "good-enough" solution (see below) - but, now, I'm curious if it's possible to show the units along with the value without it converting it to some other unit. Does anyone have any ideas about this?
One thing to note is that the data for this image is different than the data for the previous one so I'm expecting an inexact conversion to days.
You can use a custom unit. It is a bit tricky to enter the unit in the UI because of the automatic selection but if you enter i.e. "days" (without the quotes) in the Unit field ans instead of leving the field with tab or mouse click use the scrollbar of the combobox and select the last entry "Custom Unit: days".
Hope it helps. And for the record: I am using Garafana 7.1.4
I am currently working on a Grafana project and I need to translate the "All" results into "Tous".
Example of what I need
The one that is currently working is because it's got a limited number of results
Working - filter with limited results
The other variables (filters) however are more dynamic and will evolve with time. Therefore, there are unlimited possible results and it's options array is empty.
Not working - filter with unlimited results
Everytime I change the "All" text value of my "fonds" filter (the one not working) to "Tous", it resets to "All" as soon as it has a chance
Has anyone ever encountered this problem?
Thanks in advance,
Jonathan
My atomist client exposes metrics on commands that are run. Each command is a metric with a username element as well a status element.
I've been scraping this data for months without resetting the counts.
My requirement is to show the number of active users over a time period. i.e 1h, 1d, 7d and 30d in Grafana.
The original query was:
count(count({Username=~".+"}) by (Username))
this is an issue because I dont clear the metrics so its always a count since inception.
I then tried this:
count(max_over_time(help_command{job=“Application
Name”,Username=~“.+“}[1w]) -
max_over_time(help_command{job=“Application name”,Username=~“.+“}[1w]
offset 1w) > 0)
which works but only for one command I have about 50 other commands that need to be added to that count.
I tried the:
"{__name__=~".+_command",job="app name"}[1w] offset 1w"
but this is obviously very expensive (timeout in browser) and has issues with integrating max_over_time which doesn't support it.
Any help, am I using the metric in the wrong way. Is there a better way to query... my only option at the moment is the count (format working above for each command)
Thanks in advance.
To start, I will point out a number of issues with your approach.
First, the Prometheus documentation recommends against using arbitrarily large sets of values for labels (as your usernames are). As you can see (based on your experience with the query timing out) they're not entirely wrong to advise against it.
Second, Prometheus may not be the right tool for analytics (such as active users). Partly due to the above, partly because it is inherently limited by the fact that it samples the metrics (which does not appear to be an issue in your case, but may turn out to be).
Third, you collect separate metrics per command (i.e. help_command, foo_command) instead of a single metric with the command name as label (i.e. command_usage{commmand="help"}, command_usage{commmand="foo"})
To get back to your question though, you don't need the max_over_time, you can simply write your query as:
count by(__name__)(
(
{__name__=~".+_command",job=“Application Name”}
-
{__name__=~".+_command",job=“Application name”} offset 1w
) > 0
)
This only works though because you say that whatever exports the counts never resets them. If this is simply because that exporter never restarted and when it will the counts will drop to zero, then you'd need to use increase instead of minus and you'd run into the exact same performance issues as with max_over_time.
count by(__name__)(
increase({__name__=~".+_command",job=“Application Name”}[1w]) > 0
)
I was wondering what was the longest time possible to set in that close_inactive field, because I want it to be the longest as possible (since we cannot set it as infinite by any means). Their documentation does not precise it, they just put examples like 2h and 5m.
There is no limit to the close_inactive time.
You can see it in FileBeat git
In addition, if you like,You can search the variable CloseInactive in this repository and see it for your self.