* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2006-11-08 20:14 rmccabe
0 siblings, 0 replies; 6+ messages in thread
From: rmccabe @ 2006-11-08 20:14 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-11-08 20:14:21
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
make the log module ignore files whose mtime is older than current time minus max age
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.7&r2=1.8
--- conga/ricci/modules/log/LogParser.cpp 2006/10/23 18:43:35 1.7
+++ conga/ricci/modules/log/LogParser.cpp 2006/11/08 20:14:21 1.8
@@ -165,7 +165,8 @@
set<String>&
get_files(const String& path_,
- set<String>& files)
+ set<String>& files,
+ time_t age_time)
{
String path = utils::rstrip(utils::strip(path_), "/");
if (path.empty() || path.find_first_of(" ; & $ ` ? > < ' \" ; | \\ * \n \t") != path.npos)
@@ -178,11 +179,12 @@
// throw String("unable to stat ") + path;
return files;
if (S_ISREG(st.st_mode)) {
- files.insert(path);
+ if (st.st_mtime >= age_time)
+ files.insert(path);
// get rotated logs
for (int i=0; i<25; i++)
- get_files(path + "." + utils::to_string(i), files);
+ get_files(path + "." + utils::to_string(i), files, age_time);
return files;
} else if (S_ISDIR(st.st_mode))
@@ -204,7 +206,7 @@
if (kid_path == "." || kid_path == "..")
continue;
kid_path = path + "/" + kid_path;
- get_files(kid_path, files);
+ get_files(kid_path, files, age_time);
}
} catch ( ... ) {
closedir(d);
@@ -366,6 +368,13 @@
const list<String>& paths)
{
set<LogEntry> ret;
+ time_t age_time = time(NULL);
+
+ if ((long long) age_time - age < 0)
+ age_time = 0;
+ else
+ age_time -= age;
+
// set of requested tags
set<String> req_tags(domains.begin(), domains.end());
@@ -375,10 +384,10 @@
for (list<String>::const_iterator iter = paths.begin();
iter != paths.end();
iter++)
- get_files(*iter, files);
+ get_files(*iter, files, age_time);
if (files.empty()) {
- get_files("/var/log/messages", files);
- get_files("/var/log/syslog", files);
+ get_files("/var/log/messages", files, age_time);
+ get_files("/var/log/syslog", files, age_time);
}
// process log files
^ permalink raw reply [flat|nested] 6+ messages in thread* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2007-02-05 21:40 kupcevic
0 siblings, 0 replies; 6+ messages in thread
From: kupcevic @ 2007-02-05 21:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: kupcevic at sourceware.org 2007-02-05 21:40:49
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
parse log files for different gulm servers
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.8&r2=1.8.2.1
--- conga/ricci/modules/log/LogParser.cpp 2006/11/08 20:14:21 1.8
+++ conga/ricci/modules/log/LogParser.cpp 2007/02/05 21:40:49 1.8.2.1
@@ -43,6 +43,11 @@
"modclusterd",
"dlm",
"gulm",
+ "lock_gulmd",
+ "lock_gulmd_main",
+ "lock_gulmd_core",
+ "lock_gulmd_LT",
+ "lock_gulmd_LTPX",
"cman",
"cman_tool",
"ccs",
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2007-02-05 21:25 kupcevic
0 siblings, 0 replies; 6+ messages in thread
From: kupcevic @ 2007-02-05 21:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2007-02-05 21:25:53
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
parse log files for different gulm servers
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.8&r2=1.9
--- conga/ricci/modules/log/LogParser.cpp 2006/11/08 20:14:21 1.8
+++ conga/ricci/modules/log/LogParser.cpp 2007/02/05 21:25:53 1.9
@@ -43,6 +43,11 @@
"modclusterd",
"dlm",
"gulm",
+ "lock_gulmd",
+ "lock_gulmd_main",
+ "lock_gulmd_core",
+ "lock_gulmd_LT",
+ "lock_gulmd_LTPX",
"cman",
"cman_tool",
"ccs",
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2006-08-15 0:00 kupcevic
0 siblings, 0 replies; 6+ messages in thread
From: kupcevic @ 2006-08-15 0:00 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-08-15 00:00:12
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
log module: improve kernel logs handling, update tags to parse for CS5 logs
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.5&r2=1.6
--- conga/ricci/modules/log/LogParser.cpp 2006/08/11 16:27:28 1.5
+++ conga/ricci/modules/log/LogParser.cpp 2006/08/15 00:00:10 1.6
@@ -39,17 +39,30 @@
-static const char* cluster[] = {"dlm",
+static const char* cluster[] = {"cluster",
+ "modclusterd",
+ "dlm",
"gulm",
"cman",
+ "cman_tool",
+ "ccs",
+ "ccs_tool",
"ccsd",
"fence",
"fenced",
"clvmd",
"gfs",
- "clurgmgrd"};
+ "gfs2",
+ "openais",
+ "groupd",
+ "qdiskd",
+ "dlm_controld",
+ "gfs_controld",
+ "clurgmgrd",
+ "rgmanager"};
-static const char* cluster_service_manager[] = {"clurgmgrd"};
+static const char* cluster_service_manager[] = {"clurgmgrd",
+ "rgmanager"};
static const char* LVS[] = {"ipvs",
"ipvsadm",
@@ -57,10 +70,12 @@
"piranha-gui"};
static const char* storage[] = {"gfs",
+ "gfs2",
"lvm",
"clvm",
"clvmd",
"end_request",
+ "buffer",
"scsi",
"md",
"raid0",
@@ -68,10 +83,15 @@
"raid4",
"raid5",
"cdrom",
+ "ext2",
+ "ext3",
+ "ext3-fs",
+ "swap",
"mount",
"automount"};
static const char* selinux[] = {"selinux",
+ "security",
"pam",
"audit"};
@@ -201,8 +221,12 @@
vector<String> words = utils::split(entry);
if (words.size() < 6)
throw String("invalid log entry format");
- if (words[4] == "last" && words[5] == "message")
- throw String("LogEntry: last message repeatition");
+ if (words[4] == "last" &&
+ words[5] == "message")
+ throw String("LogEntry: last message repetition");
+ if (words[5] == "printk:" &&
+ entry.find("suppressed") != entry.npos)
+ throw String("LogEntry: printk repetition");
// get current year (not present in log files)
char buff[100];
@@ -236,31 +260,17 @@
tags.insert(pid);
}
vector<String>::size_type idx = 5;
- if (domain == "kernel")
- if (words[5][words[5].size()-1] == ':') {
- domain = utils::rstrip(utils::to_lower(words[5]), ":");
- tags.insert(domain);
+ if (domain == "kernel") {
+ domain = utils::rstrip(utils::to_lower(words[5]), ":");
+ tags.insert(domain);
+ if (words[5][words[5].size()-1] == ':')
idx = 6;
- }
+ }
// message
for ( ; idx<words.size(); idx++)
msg += words[idx] + " ";
msg = utils::strip(msg);
- // replace illegal XML characters
- i = 0;
- while ((i = msg.find_first_of("\"<>", i)) != msg.npos) {
- switch (msg[i]) {
- case '<':
- msg[i] = '(';
- break;
- case '>':
- msg[i] = ')';
- break;
- default:
- msg[i] = '\'';
- }
- }
// tags (misc)
for (vector<String>::size_type j=4; j<6; j++) {
^ permalink raw reply [flat|nested] 6+ messages in thread* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2006-08-11 16:27 kupcevic
0 siblings, 0 replies; 6+ messages in thread
From: kupcevic @ 2006-08-11 16:27 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-08-11 16:27:28
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
ricci log module: add 'mount' and 'automount' to storage parser
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.4&r2=1.5
--- conga/ricci/modules/log/LogParser.cpp 2006/08/10 22:53:08 1.4
+++ conga/ricci/modules/log/LogParser.cpp 2006/08/11 16:27:28 1.5
@@ -67,7 +67,9 @@
"raid1",
"raid4",
"raid5",
- "cdrom"};
+ "cdrom",
+ "mount",
+ "automount"};
static const char* selinux[] = {"selinux",
"pam",
^ permalink raw reply [flat|nested] 6+ messages in thread* [Cluster-devel] conga/ricci/modules/log LogParser.cpp
@ 2006-06-14 21:18 kupcevic
0 siblings, 0 replies; 6+ messages in thread
From: kupcevic @ 2006-06-14 21:18 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-06-14 21:18:16
Modified files:
ricci/modules/log: LogParser.cpp
Log message:
Logging module: add fence_ to fencing search
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/log/LogParser.cpp.diff?cvsroot=cluster&r1=1.2&r2=1.3
--- conga/ricci/modules/log/LogParser.cpp 2006/06/05 19:54:40 1.2
+++ conga/ricci/modules/log/LogParser.cpp 2006/06/14 21:18:16 1.3
@@ -102,18 +102,24 @@
MutexLocker l(mutex);
if (!init) {
init = true;
- sets.push_back(tag_set("cluster",
- set<string>(cluster,
- cluster + sizeof(cluster)/sizeof(char*))));
+ tag_set clu("cluster",
+ set<string>(cluster,
+ cluster + sizeof(cluster)/sizeof(char*)));
+ clu.match.insert("fence_");
+ sets.push_back(clu);
+
sets.push_back(tag_set("cluster service manager",
set<string>(cluster_service_manager,
cluster_service_manager + sizeof(cluster_service_manager)/sizeof(char*))));
+
sets.push_back(tag_set("lvs",
set<string>(LVS,
LVS + sizeof(LVS)/sizeof(char*))));
+
sets.push_back(tag_set("storage",
set<string>(storage,
storage + sizeof(storage)/sizeof(char*))));
+
tag_set SEL("selinux",
set<string>(selinux,
selinux + sizeof(selinux)/sizeof(char*)));
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-02-05 21:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08 20:14 [Cluster-devel] conga/ricci/modules/log LogParser.cpp rmccabe
-- strict thread matches above, loose matches on Subject: below --
2007-02-05 21:40 kupcevic
2007-02-05 21:25 kupcevic
2006-08-15 0:00 kupcevic
2006-08-11 16:27 kupcevic
2006-06-14 21:18 kupcevic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).