Git Product home page Git Product logo

openldap_exporter's Introduction

openldap_exporter's People

Contributors

dependabot[bot] avatar jgodin-c2c avatar szamuboy avatar tomcz avatar topical 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openldap_exporter's Issues

[Feature request] Providing a Grafana dashboard

Hello,

thank you very much for your exporter! I finally installed it on my primary OpenLDAP-server and have integrated it into Prometheus. Does somebody have a working Grafana dashboard and would like to add it here to a contrib folder? That would be really nice.

Thanks in advance.

TLS support

May it be possible to implement TLS connection to OpenLdap server?

provide a option to collect metrics upon scrape rather than collecting it periodcally

https://prometheus.io/docs/instrumenting/writing_exporters/#scheduling exposing metrics using internal scheduling is anti-pattern in prometheus, if we collect metrics when each scrape came in , these are the advantages:

  1. the default up metrics can be used to indicate whether the scrape is a success or a failure.
  2. the scrape frequency can be controlled by prometheus rather than the prometheus and exporter
  3. no hidden outdated data, if the exporter scrape data in backgroud , there is a chance that prometheus get outdated data, the metrics would

there might be disadvantage: if collection of metrics is expensive, like it takes a minute or more to complete, this could be a problem, in which case, a pushgateway may be more suitable.

Question about replicationObject parameter

Hello,

$ ldapsearch -LLL -x -H ldaps://xxxx -b dc=datac,dc=xxx,dc=com -D uid=xxxxx -w xxxx -s base contextCSN
dn: dc=datac,dc=xxx,dc=com
contextCSN: 20230104171052.895118Z#000000#001#000000
contextCSN: 20230106202836.142061Z#000000#00b#000000

I'm running with -replicationObject "dc=datac,dc=xxx,dc=com" parameter

And I'm getting this output from exporter:

$ curl -s http://localhost:9330/metrics  | grep -v \# | grep replication
openldap_monitor_replication{id="001",type="count"} 0
openldap_monitor_replication{id="001",type="gt"} 1.672855957e+09
openldap_monitor_replication{id="001",type="mod"} 0

The questions are:

1-) I'm interested to get information about #00b# and not #001# is this possible?

2-) Is this graph the expected result?

expr sum(openldap_monitor_replication) by (instance, dn)>0

image

3-) The "count" or "mod" supposed to increase somehow?

image

4-) What the "gt" metric means?

Thanks

please add latency of query ldap , and custom filter function

  1. In order to monitor the availability of ldap service , please add latency indicator for querying ldap.
    2.when I run openldap_exporter , there is a warning information, I don't know how to set filter in config.yaml , I find the objectClass=monitorOperation is a const , may I set it in config.yaml with variable?

WARN[0120] query failed component=scraper error="LDAP Result Code 1 "Operations Error": 000020D6: SvcErr: DSID-03100836, problem 5012 (DIR_ERROR), data 0\n\x00" filter="(objectClass=monitorOperation)"

Question : Monitoring Sync replication

Hello,
How --replicationObject is supposed to work ?

I made some try to monitor "dc=domain,dc=local" and I have the following error message
WARN[0030] query failed component=scraper error="LDAP Result Code 4 "Size Limit Exceeded": " filter="(objectClass=*)"

I understand the errror, but not the expected syntax

Best regards

exporter questions

Hi @tomcz,

I was taking a look at your exporter, and I am really interested in using it.
There is some issues I wanted to clarify before with you.

  1. Why do you want to set the query interval at the exporter side?
  -interval duration
        Scrape interval (default 30s)

Prometheus set this at the server-side, otherwise you have one LDAP scrape time locally, and one different by every prometheus scrape. I mean, you should be querying LDAP simultaneously when prometheus scrapes the exporter target.

  1. Why did you put your code under ~/code/src/app instead of '~/'?

If you agree with those changes, I can start making some PR.

Thanks!

Go install issue

❯ go install github.com/tomcz/openldap_exporter/cmd/openldap_exporter@latest
go: github.com/tomcz/openldap_exporter/cmd/openldap_exporter@latest (in github.com/tomcz/[email protected]):
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.
`

make fails as staticcheck@latest (2023.1) doesn't work with go 1.18

go install honnef.co/go/tools/cmd/staticcheck@latest
# honnef.co/go/tools/unused
/go/pkg/mod/honnef.co/go/[email protected]/unused/unused.go:419:14: obj.Origin undefined (type *types.Var has no field or method Origin)
/go/pkg/mod/honnef.co/go/[email protected]/unused/unused.go:421:14: obj.Origin undefined (type *types.Func has no field or method Origin)
note: module requires Go 1.19
# honnef.co/go/tools/staticcheck
/go/pkg/mod/honnef.co/go/[email protected]/staticcheck/lint.go:4025:29: righti.Method(i).Origin undefined (type *types.Func has no field or method Origin)
/go/pkg/mod/honnef.co/go/[email protected]/staticcheck/lint.go:4030:36: sel.Obj().(*types.Func).Origin undefined (type *types.Func has no field or method Origin)
note: module requires Go 1.19
make: *** [Makefile:33: lint] Error 2

go install honnef.co/go/tools/cmd/[email protected]
works

Question LDAP replication

Hi!, i'm trying to get metrics about ldap replication, i use:

/usr/bin/openldap_exporter --config exporter.yaml --replicationObject "dc=my,dc=organization"

But my ldap DB it's quite big and i get:

WARN[0270] query failed                                  component=scraper error="LDAP Result Code 4 \"Size Limit Exceeded\": " filter="(objectClass=*)"

Looking into the code i found this:

func (s *Scraper) addReplicationQueries() {
	for _, q := range s.Sync {
		queries = append(queries,
			&query{
				baseDN:       q,
				searchFilter: objectClass("*"),
				searchAttr:   monitorReplicationFilter,
				metric:       monitorReplicationGauge,
				setData:      setReplicationValue,
			},
		)
	}
}

If i change:

searchFilter: objectClass("*"),

with

searchFilter: "(contextCSN=*)",

it works, so i'm trying to make a fork adding some parameters to override that but i don't know much about go.

So the question is: i'm using this exporter right?, or there is any other way to achieve this?

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.