NETWORK PRESENCE ABOUT SERVICES PRODUCTS TRAINING CONTACT US SEARCH SUPPORT
 


Search
display results
words begin  exact words  any words part 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [FW-1] MRTG



I use crontab with some script to collect data on NOKIA ,

script on NOKIA

Collect memory used

#!/bin/sh
expr `vmstat -m | grep -A 1 "Memory Totals" | grep K | awk '{print $1}'
| sed 's/K//g'` \* 1024   > /var/admin/memory.tmp
ftp -n -v <MRTG Server IP>  << EOF
user <user name> <password>
del memory.tmp
asc
put memory.tmp
bye
EOF

Collect firewall connections

/opt/FireWall-1-des.v4.1.SP-5/bin/fw tab -t connections -s | grep
connections | awk '{print $4}' > /var/admin/connections.tmp
ftp -n -v <MRTG Server IP> << EOF
user <user name> <password>
del connections.tmp
asc
put connections.tmp
bye
EOF



Script on MRTG Server


get-CPU : collect CPU utilization

#!/bin/sh
/usr/local/bin/snmpwalk $1 $2 .1.3.6.1.4.1.94.1.21.1.7.1.0 | sed 's/
//g' | awk -F : '{print $2}'



Mrtg.cfg

WorkDir: /usr/local/www/data/mrtg
Interval: 5
Options[_]: bits, gauge, growright
Options[Firewall-CPU]: growright, integer, unknaszero, nopercent, gauge
Target[Firewall-CPU]: `/usr/local/bin/get-CPU <firewall IP> public`
MaxBytes[Firewall-CPU]: 100
WithPeak[Firewall-CPU]: ymw
ShortLegend[Firewall-CPU]: &nbsp;%,&nbsp;
YLegend[Firewall-CPU]:  % Used
LegendI[Firewall-CPU]: CPU Loading :&nbsp;
LegendO[Firewall-CPU]:
Legend1[Firewall-CPU]: Firewall CPU Loading
Legend3[Firewall-CPU]: Maximun 5 Minute CPU Loading:
#Legend4[Firewall-CPU]: Maximum 5 Minute CPU Load per second:
Title[Firewall-CPU]: Firewall CPU Loading
PageTop[Firewall-CPU]: <H1>Firewall CPU Load
 </H1>
 <TABLE>
   <TR><TD>Monitor for:</TD><TD>Firewall CPU load</TD></TR>
  </TABLE>
#-----------------------------------------------------------
Options[Firewall-memory]: growright, integer, unknaszero, nopercent,
gauge
Target[Firewall-memory]: `cat /opt/ftp/firewall/memory.tmp`
#Interval[Firewall-memory]: 1
kilo[Firewall-memory]: 1024
MaxBytes[Firewall-memory]: 268435456
WithPeak[Firewall-memory]: ymw
ShortLegend[Firewall-memory]: &nbsp;Used,&nbsp;
YLegend[Firewall-memory]: Used
LegendI[Firewall-memory]:  Memory Used :&nbsp;
LegendO[Firewall-memory]:
Legend1[Firewall-memory]: Firewall Memory Used
Legend3[Firewall-memory]: Maximun 5 Minute Memory Used:
#Legend4[Firewall-memory]: Maximum 5 Minute CPU Load per second:
Title[Firewall-memory]: Firewall Memory Used
PageTop[Firewall-memory]: <H1>Firewall Memory Used
 </H1>
 <TABLE>
   <TR><TD>Monitor for:</TD><TD>Firewall Memory Used</TD></TR>
  </TABLE>
#-----------------------------------------------------------
Options[Firewall-traffic]: growright
Target[Firewall-traffic]: 1:public@<Firewall IP>
MaxBytes1[Firewall-traffic]: 193000
MaxBytes2[Firewall-traffic]: 48000
ShortLegend[Firewall-traffic]: &nbsp;Bytes,&nbsp;
YLegend[Firewall-traffic]: Bytes
LegendI[Firewall-traffic]: Traffic in:&nbsp;
LegendO[Firewall-traffic]: Traffic out:&nbsp;
Legend1[Firewall-traffic]: Data Retrive from internet
Legend2[Firewall-traffic]: Data send to internet
Legend3[Firewall-traffic]: Maximun 5 Minute Traffic Retrive from
internet
Legend4[Firewall-traffic]: Maximum 5 Minute Traffic send to internet
Title[Firewall-traffic]: Firewall Network flow
PageTop[Firewall-traffic]: <H1>Firewall Network flow
 </H1>
 <TABLE>
   <TR><TD>Monitor for:</TD><TD>Firewall Network flow</TD></TR>
   <TR><TD>Network Speed:</TD><TD>192K Byte for Incoming
Traffic</TD></TR>
   <TR><TD>Network Speed:</TD><TD>48K Byte for Outgoing
Traffic</TD></TR>
  </TABLE>
#-----------------------------------------------------------
Target[Firewall-connections]: `cat /opt/ftp/firewall/connections.tmp`
Options[Firewall-connections]: growright, integer, unknaszero,
nopercent, gauge
MaxBytes[Firewall-connections]: 200000
ShortLegend[Firewall-connections]: &nbsp;Connections,&nbsp;
YLegend[Firewall-connections]: Connections
LegendI[Firewall-connections]: Firewall Connections:&nbsp;
LegendO[Firewall-connections]:
Legend1[Firewall-connections]: Firewall Connections
Legend2[Firewall-connections]:
Legend3[Firewall-connections]: Maximun 5 Minute Firewall Connections
Legend4[Firewall-connections]:
Title[Firewall-connections]: Firewall Connections
PageTop[Firewall-connections]: <H1>Firewall Connections
 </H1>
 <TABLE>
   <TR><TD>Monitor for:</TD><TD>Firewall Connections</TD></TR>
  </TABLE>
%

=================================================
To set vacation, Out Of Office, or away messages,
send an email to [email protected]
in the BODY of the email add:
set fw-1-mailinglist nomail
=================================================
To unsubscribe from this mailing list,
please see the instructions at
http://www.checkpoint.com/services/mailing.html
=================================================
If you have any questions on how to change your
subscription options, email
[email protected]
=================================================



 
----------------------------------

ABOUT SERVICES PRODUCTS TRAINING CONTACT US SEARCH SUPPORT SITE MAP LEGAL
   All contents © 2004 Network Presence, LLC. All rights reserved.