Changeset 610
- Timestamp:
- 05/01/05 19:32:49 (7 years ago)
- Files:
-
- trunk/ChangeLog (modified) (1 diff, 1 prop)
- trunk/server/Munin.pm.in (modified) (4 diffs, 1 prop)
- trunk/server/munin-graph.in (modified) (4 diffs, 1 prop)
- trunk/server/munin-html.in (modified) (2 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
- Property cvs2svn:cvs-rev changed from 1.257 to 1.258
r609 r610 8 8 * Main: Bugfix with graphs using both "graph_sums" and data aliases. 9 9 * Main: Tables in service-view now sorted according to graph_order. 10 * Main: Tables in service-view now containt the correct "Type" when using 11 data aliases. 10 12 * Plugins: generic/sendmail_mail{stats,traffic} updated. 11 13 * Plugins: Made generic/samba more portable (fixes by Nicolas Stransky). trunk/server/Munin.pm.in
- Property cvs2svn:cvs-rev changed from 1.43 to 1.44
r609 r610 23 23 # 24 24 # $Log$ 25 # Revision 1.44 2005/01/05 18:32:49 jimmyo 26 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 27 # 25 28 # Revision 1.43 2005/01/05 18:08:01 jimmyo 26 29 # Main: Tables in service-view now sorted according to graph_order. … … 245 248 'munin_graph_column_headers', 246 249 'munin_get_max_label_length', 247 'munin_get_field_order' 250 'munin_get_field_order', 251 'munin_get_rrd_filename' 248 252 ); 249 253 … … 279 283 my %legal_expanded = map { $_ => 1 } @legal; 280 284 285 # Fields to copy when "aliasing" a field 286 my @copy_fields = ("label", "draw", "type", "rrdfile", "fieldname", "info"); 287 288 281 289 sub munin_trend { 282 290 my (@array) = @_; … … 1098 1106 } 1099 1107 1108 sub munin_get_rrd_filename { 1109 my $node = shift; 1110 my $config = shift; 1111 my $domain = shift; 1112 my $name = shift; 1113 my $service = shift; 1114 my $field = shift; 1115 my $path = shift; 1116 my $result = "unknown"; 1117 1118 if ($node->{client}->{$service}->{$field.".filename"}) 1119 { 1120 $result = $node->{client}->{$service}->{$field.".filename"}; 1121 } 1122 elsif ($path) 1123 { 1124 if (!defined ($node->{client}->{$service}->{$field.".label"})) 1125 { 1126 print "DEBUG: Setting label: $field\n" if $DEBUG; 1127 $node->{client}->{$service}->{$field.".label"} = $field; 1128 } 1129 1130 if ($path =~ /^\s*([^:;]+)[:;]([^:]+):([^:\.]+)[:\.]([^:\.]+)\s*$/) 1131 { 1132 $result = munin_get_filename ($config, $1, $2, $3, $4); 1133 print "\nDEBUG1: Expanding $path...\n" if $DEBUG; 1134 if (! defined $node->{client}->{$service}->{$field."label"}) 1135 { 1136 for my $f (@copy_fields) 1137 { 1138 if (not exists $node->{client}->{$service}->{"$field.$f"} and 1139 exists $config->{'domain'}->{$1}->{'node'}->{$2}->{'client'}->{$3}->{"$4.$f"}) 1140 { 1141 $node->{client}->{$service}->{"$field.$f"} = $config->{'domain'}->{$1}->{'node'}->{$2}->{'client'}->{$3}->{"$4.$f"}; 1142 } 1143 } 1144 } 1145 } 1146 elsif ($path =~ /^\s*([^:]+):([^:\.]+)[:\.]([^:\.]+)\s*$/) 1147 { 1148 print "\nDEBUG2: Expanding $path...\n" if $DEBUG; 1149 $result = munin_get_filename ($config, $domain, $1, $2, $3); 1150 for my $f (@copy_fields) 1151 { 1152 if (not exists $node->{client}->{$service}->{"$field.$f"} and 1153 exists $config->{'domain'}->{$domain}->{'node'}->{$1}->{'client'}->{$2}->{"$3.$f"}) 1154 { 1155 print "DEBUG: Copying $f...\n" if $DEBUG; 1156 $node->{client}->{$service}->{"$field.$f"} = $config->{'domain'}->{$domain}->{'node'}->{$1}->{'client'}->{$2}->{"$3.$f"}; 1157 } 1158 } 1159 } 1160 elsif ($path =~ /^\s*([^:\.]+)[:\.]([^:\.]+)\s*$/) 1161 { 1162 print "\nDEBUG3: Expanding $path...\n" if $DEBUG; 1163 $result = munin_get_filename ($config, $domain, $name, $1, $2); 1164 for my $f (@copy_fields) 1165 { 1166 if (not exists $node->{client}->{$service}->{"$field.$f"} and 1167 exists $node->{client}->{$1}->{"$2.$f"}) 1168 { 1169 $node->{client}->{$service}->{"$field.$f"} = $node->{client}->{$1}->{"$2.$f"}; 1170 } 1171 } 1172 } 1173 elsif ($path =~ /^\s*([^:\.]+)\s*$/) 1174 { 1175 print "\nDEBUG4: Expanding $path...\n" if $DEBUG; 1176 $result = munin_get_filename ($config, $domain, $name, $service, $1); 1177 for my $f (@copy_fields) 1178 { 1179 if (not exists $node->{client}->{$service}->{"$field.$f"} and 1180 exists $node->{client}->{$service}->{"$1.$f"}) 1181 { 1182 $node->{client}->{$service}->{"$field.$f"} = $node->{client}->{$service}->{"$1.$f"}; 1183 } 1184 } 1185 } 1186 } 1187 else 1188 { 1189 print "\nDEBUG5: Doing path...\n" if $DEBUG; 1190 $result = munin_get_filename($config, $domain,$name,$service,$field); 1191 } 1192 return $result; 1193 } 1194 1100 1195 1101 1196 1; trunk/server/munin-graph.in
- Property cvs2svn:cvs-rev changed from 1.50 to 1.51
r609 r610 21 21 # 22 22 # $Log$ 23 # Revision 1.51 2005/01/05 18:32:49 jimmyo 24 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 25 # 23 26 # Revision 1.50 2005/01/05 18:08:01 jimmyo 24 27 # Main: Tables in service-view now sorted according to graph_order. … … 231 234 my @limit_hosts = (); 232 235 my @limit_services = (); 233 234 # Fields to copy when "aliasing" a field235 my @copy_fields = ("label", "draw", "type", "rrdfile", "fieldname", "info");236 236 237 237 # Force drawing of "graph no". … … 715 715 } 716 716 717 sub get_rrd_filename {718 my $node = shift;719 my $config = shift;720 my $domain = shift;721 my $name = shift;722 my $service = shift;723 my $field = shift;724 my $path = shift;725 my $result = "unknown";726 727 if ($node->{client}->{$service}->{$field.".filename"})728 {729 $result = $node->{client}->{$service}->{$field.".filename"};730 }731 elsif ($path)732 {733 if (!defined ($node->{client}->{$service}->{$field.".label"}))734 {735 print "DEBUG: Setting label: $field\n" if $DEBUG;736 $node->{client}->{$service}->{$field.".label"} = $field;737 }738 739 if ($path =~ /^\s*([^:;]+)[:;]([^:]+):([^:\.]+)[:\.]([^:\.]+)\s*$/)740 {741 $result = munin_get_filename ($config, $1, $2, $3, $4);742 print "\nDEBUG1: Expanding $path...\n" if $DEBUG;743 if (! defined $node->{client}->{$service}->{$field."label"})744 {745 for my $f (@copy_fields)746 {747 if (not exists $node->{client}->{$service}->{"$field.$f"} and748 exists $config->{'domain'}->{$1}->{'node'}->{$2}->{'client'}->{$3}->{"$4.$f"})749 {750 $node->{client}->{$service}->{"$field.$f"} = $config->{'domain'}->{$1}->{'node'}->{$2}->{'client'}->{$3}->{"$4.$f"};751 }752 }753 }754 }755 elsif ($path =~ /^\s*([^:]+):([^:\.]+)[:\.]([^:\.]+)\s*$/)756 {757 print "\nDEBUG2: Expanding $path...\n" if $DEBUG;758 $result = munin_get_filename ($config, $domain, $1, $2, $3);759 for my $f (@copy_fields)760 {761 if (not exists $node->{client}->{$service}->{"$field.$f"} and762 exists $config->{'domain'}->{$domain}->{'node'}->{$1}->{'client'}->{$2}->{"$3.$f"})763 {764 print "DEBUG: Copying $f...\n" if $DEBUG;765 $node->{client}->{$service}->{"$field.$f"} = $config->{'domain'}->{$domain}->{'node'}->{$1}->{'client'}->{$2}->{"$3.$f"};766 }767 }768 }769 elsif ($path =~ /^\s*([^:\.]+)[:\.]([^:\.]+)\s*$/)770 {771 print "\nDEBUG3: Expanding $path...\n" if $DEBUG;772 $result = munin_get_filename ($config, $domain, $name, $1, $2);773 for my $f (@copy_fields)774 {775 if (not exists $node->{client}->{$service}->{"$field.$f"} and776 exists $node->{client}->{$1}->{"$2.$f"})777 {778 $node->{client}->{$service}->{"$field.$f"} = $node->{client}->{$1}->{"$2.$f"};779 }780 }781 }782 elsif ($path =~ /^\s*([^:\.]+)\s*$/)783 {784 print "\nDEBUG4: Expanding $path...\n" if $DEBUG;785 $result = munin_get_filename ($config, $domain, $name, $service, $1);786 for my $f (@copy_fields)787 {788 if (not exists $node->{client}->{$service}->{"$field.$f"} and789 exists $node->{client}->{$service}->{"$1.$f"})790 {791 $node->{client}->{$service}->{"$field.$f"} = $node->{client}->{$service}->{"$1.$f"};792 }793 }794 }795 }796 else797 {798 print "\nDEBUG5: Doing path...\n" if $DEBUG;799 $result = munin_get_filename($config, $domain,$name,$service,$field);800 }801 return $result;802 }803 804 717 sub process_node { 805 718 my ($domain,$name,$node) = @_; … … 863 776 864 777 # Getting name of rrd file 865 $filename = & get_rrd_filename ($node, $config, $domain, $name, $service, $field, $path);778 $filename = &munin_get_rrd_filename ($node, $config, $domain, $name, $service, $field, $path); 866 779 867 780 my $update = RRDs::last ($filename); trunk/server/munin-html.in
- Property cvs2svn:cvs-rev changed from 1.40 to 1.41
r609 r610 21 21 # 22 22 # $Log$ 23 # Revision 1.41 2005/01/05 18:32:49 jimmyo 24 # Main: Tables in service-view now containt the correct "Type" when using data aliases. 25 # 23 26 # Revision 1.40 2005/01/05 18:08:01 jimmyo 24 27 # Main: Tables in service-view now sorted according to graph_order. … … 423 426 foreach my $f (@{&munin_get_field_order ($config->{domain}->{$domain}->{node}->{$node}, $config, $domain, $node, $service)}) 424 427 { 425 $f =~ s/=.*//; 428 $f =~ s/=(.*)$//; 429 my $path = $1; 426 430 next unless (&munin_draw_field ($config->{domain}->{$domain}->{node}->{$node}, $service, $f)); 427 print "DEBUG: single_value: Checking field \"$f\".\n" if $DEBUG; 431 print "DEBUG: single_value: Checking field \"$f\" ($path).\n" if $DEBUG; 432 433 if (defined $path) 434 { 435 munin_get_rrd_filename ($config->{domain}->{$domain}->{node}->{$node}, $config, $domain, $node, $service, $f, $path); 436 } 428 437 429 438 my %field_info;
