Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deployment/node-problem-detector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ data:
"reason": "OOMKilling",
"pattern": "Kill process \\d+ (.+) score \\d+ or sacrifice child\\nKilled process \\d+ (.+) total-vm:\\d+kB, anon-rss:\\d+kB, file-rss:\\d+kB.*"
},
{
"type": "temporary",
"reason": "PodOOMKilling",
"pattern": "Task in /kubepods/\\S+ killed as a result of limit of /kubepods/\\S+"
},
{
"type": "temporary",
"reason": "TaskHung",
Expand Down
7 changes: 2 additions & 5 deletions pkg/systemlogmonitor/log_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package systemlogmonitor

import (
"encoding/json"
"fmt"
"io/ioutil"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/heapster/common/kubernetes"
Expand All @@ -26,9 +27,6 @@ import (
"os"
"path/filepath"
"regexp"
"strings"

"fmt"
"time"

"github.com/golang/glog"
Expand Down Expand Up @@ -65,7 +63,7 @@ func init() {
}

func init() {
uuidRegx = regexp.MustCompile("[0-9a-f]{8}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{12}")
uuidRegx = regexp.MustCompile("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
}

type logMonitor struct {
Expand Down Expand Up @@ -205,7 +203,6 @@ func (l *logMonitor) generateStatus(logs []*logtypes.Log, rule systemlogtypes.Ru
if rule.Reason == OOMREASON && k8sClient != nil {
uuid := string(uuidRegx.Find([]byte(message)))

uuid = strings.ReplaceAll(uuid, "_", "-")
pl, err := k8sClient.CoreV1().Pods("").List(metav1.ListOptions{})
if err != nil {
glog.Error("Error in getting pods: %v", err.Error())
Expand Down