Help needed on Script

chalkd

ADSM.ORG Member
Joined
Nov 22, 2006
Messages
63
Reaction score
0
Points
0
Hello

I have a script setup to run in Operational Reporting every 24 hours and it is also setup to email me with the results every day. The thing is when the script runs it give me details for the last nine days.

The script is setup to pull Message No.'s ANR2099I and ANR2510I from the actlog. This was setup to show if any nodes have been registered and defined in Client schedules within a 24 hour period. The script I am using is:

select substr(char(date_time), 1, 16) as date_time,message from actlog where (date_time between '2007-11-20 11:00:00' and '2007-11-20 12:00:00') and msgno=2510 or msgno=2099

Is there anything I need to add just to report for a 24Hr Period only?

One other point is there anything I can also add into this script to find out who was respnsible for adding and defing a new node?
 
Last edited:
Try:
select substr(char(date_time), 1, 16) as date_time,message from actlog where (date_time>'2007-11-20 11:00:00' and date_time<'2007-11-20 12:00:00') and (msgno=2510 or msgno=2099)

About the other question...I am working on it
 
If I understood well, you can add:

select NODE_NAME, REG_ADMIN from nodes where (reg_time>'2007-11-22 13:53:00.000000' and reg_time<'2007-11-22 14:00:00.000000')

Maybe combine it with your previous SQL Query.

I hope that it helps
 
Read some old threads, or do a search. There is some rather intriguing syntax for this.

Look in the SCRIPTING forum, not the Security one.
 
Back
Top