Hello,
I would to query the LDAP Server via this command line :
# ldapsearch -x -b "dc=domain,dc=society,dc=fr" -h localhost | grep dn: | wc -l
This command will give me the count of entry "dn:" contained in my LDAP.
Then I would just have a graph of this value in my CACTI.
Do you think that is possible?
Thank you
OPENLDAP
Moderators: Developers, Moderators
Re: OPENLDAP
I edited my topic to make it more clear
Re: OPENLDAP
is the latency being reported the average latency or the current latency from the latest poll on both the TCP and HTTP scripts?
Last edited by anamta on Tue Oct 21, 2014 12:36 am, edited 1 time in total.
Re: OPENLDAP
The latency is not the problem.
My CACTI Server is on a special network.
If I use the command on a server, it'll answer me a number between 50000 and 100000.
That's this number I need to graph...
My CACTI Server is on a special network.
If I use the command on a server, it'll answer me a number between 50000 and 100000.
That's this number I need to graph...
Re: OPENLDAP
Hi,
I used the perl script, <path_cacti>/scripts/ping.pl as an example to make my script ...
Here it is:test_ldap.pl
The test_ldap.pl lunch this test_ldap.sh on my LDAP Server:
- If I run the .sh on the LDAP Server : I recieve a number.
- If I run the .pl on the CACTI Server : I recieve a number.
But CACTI does not make me a graph...
Only some "-nan"
Could you help me to find my mistakes?
Thank you
I used the perl script, <path_cacti>/scripts/ping.pl as an example to make my script ...
Here it is:test_ldap.pl
Code: Select all
#!/usr/bin/perl
# Use open to call a file.sh
open(PROCESS,'ssh root@IP \"/usr/local/bin/test_ldap.sh\" |') || die ("echec: $!\n");
while (<PROCESS>)
{
print $_;
}
close(PROCESS);
Code: Select all
#!/bin/bash
ldapsearch -x -b "dc=domain,dc=fr" -h localhost | grep dn: | wc -l
- If I run the .pl on the CACTI Server : I recieve a number.
But CACTI does not make me a graph...
Only some "-nan"
Could you help me to find my mistakes?
Thank you
Who is online
Users browsing this forum: No registered users and 2 guests