1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
Author: Guillem Jover <gjover@sipwise.com>
Forwarded: not-needed
Description: Disable uyuni discovery module
This requires modules not present in Debian.
Last-Updated: Sat Mar 12 18:35:22 2022 +0000
config/config_test.go | 23 +----------------------
config/testdata/conf.good.yml | 6 ------
discovery/install/install.go | 1 -
discovery/uyuni/uyuni.go | 2 ++
4 files changed, 3 insertions(+), 29 deletions(-)
@@ -48,7 +48,6 @@
"github.com/prometheus/prometheus/discovery/scaleway"
"github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/discovery/triton"
- "github.com/prometheus/prometheus/discovery/uyuni"
"github.com/prometheus/prometheus/discovery/xds"
"github.com/prometheus/prometheus/discovery/zookeeper"
"github.com/prometheus/prometheus/model/labels"
@@ -881,26 +880,6 @@
},
},
},
- {
- JobName: "uyuni",
-
- HonorTimestamps: true,
- ScrapeInterval: model.Duration(15 * time.Second),
- ScrapeTimeout: DefaultGlobalConfig.ScrapeTimeout,
- HTTPClientConfig: config.HTTPClientConfig{FollowRedirects: true},
- MetricsPath: DefaultScrapeConfig.MetricsPath,
- Scheme: DefaultScrapeConfig.Scheme,
- ServiceDiscoveryConfigs: discovery.Configs{
- &uyuni.SDConfig{
- Server: "https://localhost:1234",
- Username: "gopher",
- Password: "hole",
- Entitlement: "monitoring_entitled",
- Separator: ",",
- RefreshInterval: model.Duration(60 * time.Second),
- },
- },
- },
},
AlertingConfig: AlertingConfig{
AlertmanagerConfigs: []*AlertmanagerConfig{
@@ -985,7 +964,7 @@
yamlConfig := string(config)
matches := secretRe.FindAllStringIndex(yamlConfig, -1)
- require.Equal(t, 15, len(matches), "wrong number of secret matches found")
+ require.Equal(t, 14, len(matches), "wrong number of secret matches found")
require.NotContains(t, yamlConfig, "mysecret",
"yaml marshal reveals authentication credentials.")
}
@@ -1289,10 +1268,6 @@
filename: "empty_scrape_config_action.bad.yml",
errMsg: "relabel action cannot be empty",
},
- {
- filename: "uyuni_no_server.bad.yml",
- errMsg: "Uyuni SD configuration requires server host",
- },
}
func TestBadConfigs(t *testing.T) {
@@ -326,12 +326,6 @@
- authorization:
credentials: abcdef
- - job_name: uyuni
- uyuni_sd_configs:
- - server: https://localhost:1234
- username: gopher
- password: hole
-
alerting:
alertmanagers:
- scheme: https
@@ -33,7 +33,6 @@
_ "github.com/prometheus/prometheus/discovery/puppetdb" // register puppetdb
_ "github.com/prometheus/prometheus/discovery/scaleway" // register scaleway
_ "github.com/prometheus/prometheus/discovery/triton" // register triton
- _ "github.com/prometheus/prometheus/discovery/uyuni" // register uyuni
_ "github.com/prometheus/prometheus/discovery/xds" // register xds
_ "github.com/prometheus/prometheus/discovery/zookeeper" // register zookeeper
)
@@ -11,6 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// +build ignore
+
package uyuni
import (
@@ -11,6 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// +build ignore
+
package uyuni
import (
|