Giter Site home page Giter Site logo

andreyvmarkelov / jira-prometheus-exporter Goto Github PK

View Code? Open in Web Editor NEW
124.0 9.0 37.0 1.43 MB

Prometheus Exporter For JIRA

Home Page: https://marketplace.atlassian.com/plugins/ru.andreymarkelov.atlas.plugins.prom-jira-exporter/server/overview

License: BSD 2-Clause "Simplified" License

Java 99.02% Shell 0.98%
prometheus-exporter grafana jira prometheus jira-monitoring jira-plugin prometheus-metrics

jira-prometheus-exporter's Introduction

jira-prometheus-exporter's People

Contributors

adamdmharvey avatar alexey-matveev-atlas avatar andreyvmarkelov avatar chrisbloemker avatar ivuk avatar mr-exz avatar wawe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jira-prometheus-exporter's Issues

Change the authentication to OAuth

Currently, the authentication is via the parameter "token", which can not be protected on Prometheus. Can we change the authentication to OAuth, which is corresponding to "bearer_token" in Prometheus.

High CPU load when the plugin is active

Hi,

We are seeing relatively high CPU load on our testing instance of JIRA when activating the plugin.
screenshot 2018-11-16 at 11 22 40 am
around 10:35 the plugin was installed, and we observed a significant rise in CPU load. To check if this was due to the plugin, we disabled it around 11:08, to enable it again at 11:18. we did the same between 11:24 and 11:30. The logs did not show any errors, and the exporter further worked as expected, exposing metrics.

has there been any reports of this behaviour before?

Cheers,

Leaking metrics

Following 2 metrics producing very high number of series on the server.

jira_issue_update_count{projectKey="y",issueKey="y-16364",eventType="Issue Updated",username="z",} 1.0
jira_total_sessions_gauge{ip="x,y",username="p",requestsCount="168",} 1.0

One of the first problems is jira_total_sessions_gauge where requestsCount is used as label, not a value. Due to different 'requestsCount' all the values are set to '1.0' ip should also be split up, or fully dropped.

jira_issue_update_count have user x ticket x eventType cardinality. It means in the system with 1k users and 1k tickets you'lll have 5 million time series which will easily kill any Prometheus.

Duplicate Quick Search Gauge metrics error

When deploying to Jira 7.6 we get two Quick Search gauges which causes our setup to fail. Is there any control over what metrics are exposed or a way to remove duplicates? Here is an example from an out of the box setup of Jira.

# HELP jira_concurrent_number_of_quicksearches_gauge Concurrent number of quicksearches
# TYPE jira_concurrent_number_of_quicksearches_gauge gauge
jira_concurrent_number_of_quicksearches_gauge 0.0
# HELP jira_concurrent_number_of_quicksearches_gauge Concurrent number of quicksearches
# TYPE jira_concurrent_number_of_quicksearches_gauge gauge
jira_concurrent_number_of_quicksearches_gauge 0.0

New metrics

ould like to ask from if you could add some new metrics,
i would like to see some info which is important for our devops team
Jira: sprint remaining time per project, and log work per project,sprint,issue

Metrics for Data Center

Is it possible to get metrics from all DC node as labels
Cause now, we scrape each node per ip, and got common duplicated metrics
I think it will be easier to scrape one stable node and get metrics for all others, than scrape n nodes

Log4j-core is older needs to be updated

Log4j-core is showing critical vulnerabilities that can result in arbitrary code execution in this particular plugin. Is there any way that we can upgrade log4j in this plugin?

Total attachments size not working

The total attachments size gauge in version 1.0.10 steadily reports a value of 0 due to a commented section in the respective part of the source code.

Please note that this is very much appreciated, at least from our perspective, as this new "feature" rendered the plugin practically unusable in our JIRA installation due to the huge number of attachments (prometheus queries took several seconds for collecting the data per each request).

Jira 8.7 support

Hi,

It seems that the plugin is not functioning in Jira 8.7.1, as it throws the following errors and does not display metrics:

2020-02-21 07:20:45,629+0100 ThreadPoolAsyncTaskExecutor::Thread 39 ERROR XXXXXXXX 440x95641x1 lnu1vp XXX.XXX.XXX.XXX /rest/plugins/1.0/ru.andreymarkelov.atlas.plugins.prom-jira-exporter-key [r.a.a.p.promjiraexporter.service.MetricCollectorImpl] Error collect prometheus metrics
java.lang.NoSuchMethodError: com.atlassian.application.api.Application.getLicense()Lcom/atlassian/fugue/Option;
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.licenseMetrics(MetricCollectorImpl.java:418)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collectInternal(MetricCollectorImpl.java:472)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collect(MetricCollectorImpl.java:610)
	at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:100)
	at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.afterPropertiesSet(MetricCollectorImpl.java:597)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1753)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1690)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2020-02-21 07:20:52,248+0100 http-nio-8080-exec-8 url:/plugins/servlet/prometheus/metrics ERROR anonymous 440x95655x1 - XXX.XXX.XXX.XXX /plugins/servlet/prometheus/metrics [r.a.a.p.promjiraexporter.service.MetricCollectorImpl] Error collect prometheus metrics
java.lang.NoSuchMethodError: com.atlassian.application.api.Application.getLicense()Lcom/atlassian/fugue/Option;
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.licenseMetrics(MetricCollectorImpl.java:418)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collectInternal(MetricCollectorImpl.java:472)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collect(MetricCollectorImpl.java:610)
	at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183)
	at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:216)
	at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:137)
	at io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:22)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.PrometheusExporter.doGet(PrometheusExporter.java:44)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:37)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:46)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	... 44 filtered
	at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55)
	... 8 filtered
	at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59)
	... 4 filtered
	at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54)
	... 3 filtered
	at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
	... 8 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 51 filtered
	at com.atlassian.ams.shipit.servlet.filter.AbstractThreadFilter.doFilter(AbstractThreadFilter.java:56)
	at com.atlassian.ams.shipit.servlet.filter.AbstractThreadFilter.doFilter(AbstractThreadFilter.java:37)
	... 14 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
	... 1 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
	... 16 filtered
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.AllEndpointFilter$1.run(AllEndpointFilter.java:44)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.requestDuration(MetricCollectorImpl.java:266)
	at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.AllEndpointFilter.doFilter(AllEndpointFilter.java:39)
	... 23 filtered
	at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
	... 5 filtered
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:212)
	at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136)
	at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89)
	at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:203)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:134)
	at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:123)
	... 4 filtered
	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
	... 8 filtered
	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
	... 4 filtered
	at com.atlassian.ams.shipit.servlet.filter.AbstractThreadFilter.runWithChangedThreadName(AbstractThreadFilter.java:69)
	at com.atlassian.ams.shipit.servlet.filter.AbstractThreadFilter.doFilter(AbstractThreadFilter.java:53)
	at com.atlassian.ams.shipit.servlet.filter.AbstractThreadFilter.doFilter(AbstractThreadFilter.java:37)
	... 3 filtered
	at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
	... 29 filtered
	at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
	... 27 filtered
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

Are you planning to update the plugin for Jira 8.7?

Cheers,

Metrics status is always Down on Prometheus

I have installed this plugin on my Jira container and can see all metrics at the said path.
The host on which this Jira container is running has a DNS name and Jira is accessible using this DNS name.
Now the problem is, when I am mentioning this Exporter details in prometheus.yml file, Prometheus is always showing Down status for this metrics under target tab.

I tried with DNSname:80, DNSname:443, IPAdd:80 etc. but every time it is showing same error. My Jira instance is running on port 80.
Note- I am using node-exporter/alertmanager etc and their entries are made the same way like IPADDR:port and its in Up status.

It would be great if I can configure this metrics on a different port just like node-exporter or other.

OR any other help would really be appreciated.
Please let me now if any other details are required from me.

jira-prometheus-exporter add-on not export *jira* matrics in datacenter mode

i installed the add-on on Jira DC that contain 2 nodes and 1 Load balancer in front (haproxy).
i configure the prometheus config.yaml to scrape both nodes and put also labels on each node.
the scrape section at the prometheus config.yaml look like:

  • job_name: 'jira'
    scheme: http
    metrics_path: '/plugins/servlet/prometheus/metrics'
    static_config:
    • targets: ['145.1.45.141:8080']
      labels:
      nodeID: node01
      ip: '145.1.45.141'
    • targets: ['145.1.45.142:8080']
      labels:
      nodeID: node02
      ip: '145.1.45.142'

the metrics that the exporter export to the prometheus are only jvm & process TYPES
there is no JIRA type at all

hence i cant measure metrics that related to jira like:
jira_issue_update_count
jira_user_login_count
jira_user_logout_count
etc....

anything that start with jira_

BTW,
i have the same configuration at bitbucket and there the bitbucket exporter is exporting bitbucket metrics include jvm & process

please assist here

Metrics for non-existing endpoints

We encountered the issue that the exporter creates a whole bunch of metrics for ALL paths being called from the browser, even the non existing ones, like /admin.php, ../../../../etc/shadow, ../../../etc/shadow and so on and so forth.

Any instance that is listening on the internet will inevitably get scanned by hundreds of bots, completely overwhelming both JIRA and the prometheus server when metrics are being crawled.

This could very well be a cause for #36 as well.

We had to disable the exporter because it was destroying our prometheus and JIRA

Counter for http_requests by status_code

Hi, could you please add counters for http requests status codes and maybe for http methods? E.g.:

jira_web_requests_counter{instance="jira:443",job="jira",status="200",method="get"} 123 jira_rest_requests_counter{instance="jira:443",job="jira",status="500",method="post"} 123

The web-section in admin gui can not be wrapped.

In /jira-prometheus-exporter/src/main/resources/atlassian-plugin.xml, the label of web-section is too long and it can not be wrapped since it is a section.
<web-section name="Security Token Admin Section" key="prom-for-jira-exporter-admin-section" location="admin_plugins_menu">
<label key="ru.andreymarkelov.atlas.plugins.promjiraexporter.section"/>
</web-section>

It would be nice if the label is shorten to "promjiraexporter"

What happened to Jira Prometheus Exporter regarding Jira 8.1?

Hi,
I did a test upgrade to Jira 8.1 and noticed that the Jira Prometheus Export plugin is not compatible. However, when I was trying to check for a new compatible version at the marketplace https://marketplace.atlassian.com/apps/1217960/prometheus-exporter-for-jira/version-history there is a message:
"This app provides core functionality to one or more Atlassian products"

What happened with the plugin and the marketplace listing?
Has it been integrated with Jira Core?

Kind regards,
Patrice

missing some metrics

My metrics only include jvm。
Exporter version- 1.0.22
Jira Version- 8.0.1
just as:
image

NPE

Hi,
we try to use your plugin,
but rest endpoint returns ~ 20 first values only.
On valid licences (CORE, SOFTWARE) plugin throws NPE:
2018-05-04 15:52:10,821 http-nio-51234-exec-183 ERROR Alimirzoev.VA 952x3373185x18 oa59u0 172.17.20.73,172.17.252.119 /plugins/servlet/prometheus/metrics [r.a.a.p.promjiraexporter.service.MetricCollectorImpl] Error collect prometheus metrics java.lang.NullPointerException at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collectInternal(MetricCollectorImpl.java:296) at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.collect(MetricCollectorImpl.java:395) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:183) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:216) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:137) at io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:22) at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.PrometheusExporter.doGet(PrometheusExporter.java:44) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:37) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:45) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ... 52 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:80) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:78) ... 16 filtered at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.AllEndpointFilter.lambda$doFilter$0(AllEndpointFilter.java:38) at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.MetricCollectorImpl.requestDuration(MetricCollectorImpl.java:243) at ru.andreymarkelov.atlas.plugins.promjiraexporter.servlet.AllEndpointFilter.doFilter(AllEndpointFilter.java:38) ... 24 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 5 filtered at com.valiantys.jira.plugins.sql.service.servicedesk.ContextListenerServletFilter.doFilter(ContextListenerServletFilter.java:24) ... 8 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 29 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 28 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

missing some metrics

My metrics only include jvm and process。
Exporter version- 1.0.25
Jira Version- 7.12.3

New metrics to get number of active/waiting connector threads of tomcat

Recently we ran into the situation that our Jira instance had problems responding to web requests. Problem was related to that all tomcat connector threads were in the (time) waiting state. If these metrics data could be exposed, it would help us in better and earlier recognising such a situation.

I am aware of that the thread state is already available for the jvm, however this may include many other unrelated threads as well.

jira 7: jira_total_attachments_gauge shows 0 as value

Hello everyone,

for jira 7 the total attachment size gauge shows 0 as value
metrics page:

  • HELP jira_total_attachment_size_gauge Total Attachments Size Gauge
  • TYPE jira_total_attachment_size_gauge gauge
    jira_total_attachment_size_gauge 0.0

In the jira logs the following is shown:
2019-09-02 15:07:09,358 pool-67-thread-1 ERROR jira-internal-sysadmin 574x1815x1 1uvdfio 53.18.156.27:24648,127.0.0.1 /rest/plugins/1.0/ [r.a.a.p.promjiraexporter.service.ScheduledMetricEvaluator] Failed to resolve attachments size.
com.microsoft.sqlserver.jdbc.SQLServerException: invalid object name "fileattachment".

Is this metric bugged or is it only availabe in jira 8 exporter? On older versions (1.0.27) this seems to work fine.

Jira is installed on a MS Server. Database is mssql.

BR

Can't import dashboard in grafana

Hi,
I have this problem with importing a dashboard ( Id=5249 ) into my grafana. I'm using grafana 6.0.0, Prometheus 2.8.0 and Prometheus Exporter for Jira 1.0.21. All correctly installed. While importing json file or entering ID/url, I'm getting error "Unexpected token u in JSON at position 0".
Prometheus is added as "Data Source" and he is listening on port 9090.
Prometheus.yml contains following lines:
scrape_configs:

  • job_name: 'jira'
    scheme: https # change to http if don't you have https
    metrics_path: '/jira/plugins/servlet/prometheus/metrics'
    static_configs:
    • targets: ['myhost:2990'] # Jira host and port you serve
      as recommended.
      What could be a problem?

Unbound cardinality of jira_request_duration_on_path_bucket

I'm seeing count(jira_request_duration_on_path_bucket) over 50000. It looks like each request is getting counted - even those for non-existend URLs. Some of the lowest-used buckets look like scanning for generic security issues: /ocportal, /%3F.jsp, /~root.

Would it be possible to only create buckets for URLs JIRA might actually use?

Add license metrics

Could you please add license metrics such as:

  • current number of users
  • maximum number of users
  • number of days before maintenance expiry

Add warning about publicly exposing usernames.

Hi! Awesome work with this plugin, we use it all the time and it works superbe!

I have just one suggestion: add a notice to the top of the readme, wiki and atlassian-plugin-page that warns administrators that by default, usernames will be exposed to the public. Maybe something along the lines of:

Be aware, this plugin publicly exposes some sensitive data by default. The metrics page exposes the username of who last logged in, who last edited issues in every project and some more usernames. You should enable token protection to make sure the public cannot view usernames.

Update the wiki

Hello,

This suffers the same issue as the confluence one
scrape_configs:

  • job_name: 'jira'
    scheme: https #change to http if don't you have https
    metrics_path: '/jira/plugins/servlet/prometheus/metrics'
    static_configs:
    • targets: ['myhost:2990'] #this can be any port you're running jira on.

Prometheus Exporter for Jira cause jira to become unresponsive?

HI Andrey,
At some point of time Jira became unresponsive for user requests but remained running.
Thread dumps analysis showed this.

The thread dumps and CPU reading show only one thread actively doing work, and most of the other threads are blocked in (WAITING - parked) state. This is the thread from the top outputs:

"http-nio-8080-exec-136 url:/plugins/servlet/gadgets/ifr username:user_x " #333526 daemon prio=5 os_prio=0 tid=0x00007fd44803a800 nid=0x112dc runnable [0x00007fd1c07ef000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) - locked <0x00007fd7210085f0> (a java.lang.Object) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) - locked <0x00007fd72100a6c0> (a sun.security.ssl.AppInputStream)

This thread that is RUNNABLE across the entire capture period is a pool thread (background daemon, not a user service thread):

"pool-11-thread-1" #90 prio=1 os_prio=0 tid=0x00007fd4e02dd800 nid=0x4739 runnable [0x00007fd495a45000] java.lang.Thread.State: RUNNABLE at sun.nio.fs.UnixNativeDispatcher.readdir(Native Method) at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.readNextEntry(UnixDirectoryStream.java:168) at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.hasNext(UnixDirectoryStream.java:201) - locked <0x00007fd981e0c538> (a sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator) at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:348) at java.nio.file.Files.walkFileTree(Files.java:2706) at java.nio.file.Files.walkFileTree(Files.java:2742) at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.ScheduledMetricEvaluatorImpl.calculateAttachmentSize(ScheduledMetricEvaluatorImpl.java:118) at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.ScheduledMetricEvaluatorImpl.access$100(ScheduledMetricEvaluatorImpl.java:28) at ru.andreymarkelov.atlas.plugins.promjiraexporter.service.ScheduledMetricEvaluatorImpl$2.run(ScheduledMetricEvaluatorImpl.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

It appears to be monitoring or iterating over a directory structure, related to Jira Exporter plugin. Additionally there is only one RUNNABLE threads which services a user request:

"http-nio-8080-exec-136 url:/plugins/servlet/gadgets/ifr username:user_x " #333526 daemon prio=5 os_prio=0 tid=0x00007fd44803a800 nid=0x112dc runnable [0x00007fd1c07ef000]

The thread dump is basically showing the locks placed by the thread while it's waiting for data:

"http-nio-8080-exec-136 url:/plugins/servlet/gadgets/ifr username:user_x " #333526 daemon prio=5 os_prio=0 tid=0x00007fd44803a800 nid=0x112dc runnable [0x00007fd1c07ef000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) - locked <0x00007fd7210085f0> (a java.lang.Object) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) - locked <0x00007fd72100a6c0> (a sun.security.ssl.AppInputStream)

All of the other http threads for user requests are on a WAITING - parked state, which is why the application was unresponsive. It appears that they are waiting for a lock release from one of the threads mentioned above. For example:

"http-nio-8080-exec-46 url:/plugins/servlet/gadgets/ifr username:user_z " #58048 daemon prio=5 os_prio=0 tid=0x00007fd448015800 nid=0x1960e waiting on condition [0x00007fd38119e000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00007fd68c4eb2e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

  • GC and heap analysis show no memory related issues, so GC or memory usage is not causing any problem with the application

The only http thread actively running was this:

"http-nio-8080-exec-136 url:/plugins/servlet/gadgets/ifr username:user_x " #333526 daemon prio=5 os_prio=0 tid=0x00007fd44803a800 nid=0x112dc runnable [0x00007fd1c07ef000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) - locked <0x00007fd7210085f0> (a java.lang.Object) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) - locked <0x00007fd72100a6c0> (a sun.security.ssl.AppInputStream)

As the other http threads were waiting to acquire a lock, it looks like the exec-136 was itself being unable to retrieve data from cache.
Since the only other active thread for the timeframe was the pool-thread which makes use of Prometheus,
we make the inference that it is some functionality in the plugin which took a long time and was preventing the cache lock from being released

Plugin version: 1.0.20
Jira: Data Center 7.6.1

Are there any known cases similar to this one?
Thank you.

Support for Jira 8.x

We plan to upgrade to Jira 8.x. Please update the plugin so that it is compatible with 8.0 and up :)

Exclude some metrics

Hi, Is it possible to exclude some metrics, for example, not expose the metric issueUpdateCounter?

Some of the the metrics are not available for my Jira Instance

Hi,

I have configured my Jira instance to provide metrics to Prometheus and its is working fine. But I have one issue, some of the metrics as I can see in example like Login/Logout count, issues count per project are not available to me.
I have done the exact thing as directed.
Exporter version- 1.0.20
Jira Version- 7.3.9

Can someone let me know why is it happening? Am I missing something.
Kindly let me know if some other details are required from my side.

Don't open Configuration page for plugin

Hi! maybe you can help me, but I have got an old version Jira 6.2. So I have to installed plugin version Version: 1.0.2 .
Jira is 32-bit and working on windows.
When I tried click Configure bottom I have had error. Log
https://pastebin.com/nZDwqGS8

Maybe is there approaches in the world which can help me?

Add product labels to jira_active_users_gauge metric

Hello everyone,

the problem with the current metric jira_active_users_gauge is, that it does not distinguish between the different JIRA products like Software and Service Desk.

Here's an example:

If you have 478 active JIRA Software users and 22 active JIRA Service Desk users the jira_active_users_gauge metric will report 500 users.

So today it is not possible to create prometheus alerts based on license usage of a product. At the moment we are using this query to send alerts if the JIRA license usage is higher than 80%:

jira_active_users_gauge{job="jira"} / ignoring(licenseType) jira_allowed_users_gauge{licenseType="JIRA Software"} * 100 > 80

My suggestion would be to add labels for the products just like for the jira_allowed_users_gauge metric:

jira_active_users_gauge{licenseType="JIRA Software"}
jira_active_users_gauge{licenseType="JIRA Service Desk"}

What do you think? Does this sound reasonable?

Best regards
Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.