[mrtg] Config process time

Keith E Johnson kj at sunclipse.com
Thu Aug 8 03:55:17 MEST 2002


I'm thinking about running some sql queries to get stats from my syslog
database....

The queries can take up to a minute to run during the middle of the day when
the box is maxed out. So I'm wondering is this is going to cause me any
problems??

Thanx, kj

--mrtg script (internet outbound access-list hits)
set nocount on 
use syslog
DECLARE @v1 int 
-- access-list hits
SET @v1 = (select count(*) from syslogd where msghostname like 'sisirt01'
and msgtext like '%SEC-6-IPACCESSLOGP: list 152%' and msgdate like
LEFT(CONVERT(varchar,GetDate(),120), 10))

print @v1
print 0
print 0
print 0
-- mrtg script (router login vs. router config mode)
set nocount on 
use syslog
DECLARE @v1 int 
DECLARE @v2 int 
-- Router Login
SET @v1 = (select count(*) from syslogd where msghostname like '%rtr%' and
msgtext like '%SEC-6-IPACCESSLOGS: list 1 permitted%' and msgdate like
LEFT(CONVERT(varchar,GetDate(),120), 10))
-- Router config mode
SET @v2 = (select count(*) from syslogd where msghostname like '%rtr%' and
msgtext like '%SYS-5-CONFIG_I: Configured from console%' and msgdate like
LEFT(CONVERT(varchar,GetDate(),120), 10))

print @v1
print @v2
print 0
print 0

	Keith Johnson
	Lan Administrator
	Amcor Sunclipse North America
	6600 Valley View Street, Buena Park, CA 90620
	Voice: 714.562.6179 Fax: 714.562.2036
	Email: keith.johnson at sunclipse.com







--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list