slapd_
munin 플러그인을 구현하려고합니다.이 플러그인은 perl로 작성되었으므로별로 우경이 없습니다. The full plugin is available here.slapd_ munin plugin의 연결 (.) 또는 문자열에서 초기화되지 않은 값 사용
my $searchdn = $ops{$action}->{'search'} . "," . $basedn;
나는 모든 변수를하고 출력하기로 디버깅을 시도/객체는 다음과 같습니다 :
Use of uninitialized value in concatenation (.) or string at
/etc/munin/plugins/slapd_localhost line 232, <DATA> line 275.
라인 (232)이 하나입니다 : 내가 갖는 오류이 하나입니다
use Data::Dumper; # top of script
# [...]
print Dumper(%ops);
print "action = [$action]\n";
print "basedn = [$basedn]\n\n";
my $searchdn = $ops{$action}->{'search'} . "," . $basedn;
다시 실행하면 여기에 내가 얻은 것이 있습니다.
[...] # 15 other variables belonging to $ops
$VAR16 = {
'info' => 'The graph shows the number of Waiters',
'search' => 'cn=Waiters',
'desc' => 'The current number of Waiters',
'filter' => '(|(cn=Write)(cn=Read))',
'title' => 'Number of Waiters',
'label2' => {
'read' => 'Read',
'write' => 'Write'
},
'vlabel' => 'Waiters'
};
action = [localhost]
action = [cn=Monitor]
Use of uninitialized value in concatenation (.) or string at /etc/munin/plugins/slapd_localhost line 237, <DATA> line 275.
모든 변수가 설정되어있는 것 같아서, 나는 정말로 내가받는 오류 메시지를 이해하지 못한다.
Q : 아무도이 스크립트를 디버깅하는 방법에 대해 조언 할 수 있습니까?
는
$ basen에 값이 지정 되었습니까? – canavanin