我们已经在jenkins示例中安装了prometheus插件,并且https://jenkins-url/prometheus
端点中提供了指标。但是可用的数据只有2天的时间。我想知道是否有方法可以增加此数据保留。
Jenkins Prometheus插件配置org.jenkinsci.plugins.prometheus.config.PrometheusConfiguration.xml
:
<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.prometheus.config.PrometheusConfiguration plugin="prometheus@2.0.10">
<urlName>prometheus</urlName>
<additionalPath></additionalPath>
<defaultNamespace>default</defaultNamespace>
<jobAttributeName>jenkins_job</jobAttributeName>
<useAuthenticatedEndpoint>true</useAuthenticatedEndpoint>
<collectingMetricsPeriodInSeconds>120</collectingMetricsPeriodInSeconds>
<countSuccessfulBuilds>true</countSuccessfulBuilds>
<countUnstableBuilds>true</countUnstableBuilds>
<countFailedBuilds>true</countFailedBuilds>
<countNotBuiltBuilds>true</countNotBuiltBuilds>
<countAbortedBuilds>true</countAbortedBuilds>
<fetchTestResults>true</fetchTestResults>
<processingDisabledBuilds>false</processingDisabledBuilds>
<appendParamLabel>false</appendParamLabel>
<appendStatusLabel>false</appendStatusLabel>
<labeledBuildParameterNames></labeledBuildParameterNames>
<collectDiskUsage>true</collectDiskUsage>
</org.jenkinsci.plugins.prometheus.config.PrometheusConfiguration>
[
]
我尝试在Github中探索prometheus插件源代码。搜索保留,存储等关键字,但找不到任何东西。PrometheusConfiguration-JavaDoc
1条答案
按热度按时间2sbarzqh1#
不是这样的Prometheus插件只是暴露指标(它们的当前状态),它不存储任何东西。
数据由Prometheus存储。您可以在this answer中查看如何更改Prometheus的保留策略。