@@ -209,7 +209,7 @@ func regexpDeal(bodyStatus string, body io.ReadCloser) io.ReadCloser {
209
209
match := tagCompile .FindAllStringSubmatch (resValue .(string ), - 1 )
210
210
for _ , matchArr := range match {
211
211
if len (matchArr ) > 2 {
212
- tagConvRes [matchArr [1 ]] = matchArr [2 ]
212
+ tagConvRes [strings . TrimSpace ( matchArr [1 ]) ] = strings . TrimSpace ( matchArr [2 ])
213
213
}
214
214
}
215
215
}
@@ -361,7 +361,7 @@ func initUnitMap(cfg *ini.File) error {
361
361
return err
362
362
}
363
363
364
- if (samplingIntervalSecond == 0 || samplingIntervalSecond == 0 ||
364
+ if (samplingIntervalSecond == 0 ||
365
365
inhibitionIntervalSecond == 0 || inhibitionThresholdNum == 0 ) {
366
366
log .WithFields (log.Fields {
367
367
"severityName" : severityName ,
@@ -396,7 +396,7 @@ func initUnitMap(cfg *ini.File) error {
396
396
return err
397
397
}
398
398
399
- if (samplingIntervalSecond == 0 || samplingIntervalSecond == 0 ||
399
+ if (samplingIntervalSecond == 0 ||
400
400
inhibitionIntervalSecond == 0 || inhibitionThresholdNum == 0 ) {
401
401
log .WithFields (log.Fields {
402
402
"severityName" : severityName ,
@@ -753,4 +753,4 @@ func main() {
753
753
log .Println ("the zabbix-robot is runnig ......" )
754
754
http .HandleFunc (MainURL , alertHandler )
755
755
http .ListenAndServe (MainListen , nil )
756
- }
756
+ }
0 commit comments