Hi
I have a script that gets connected oracle user numbers and puts them into a log file. How can i take this log file and import it into cacti?
thanks
Log File -> cacti
Moderators: Developers, Moderators
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Re: Log File -> cacti
Hichewymix wrote:I have a script that gets connected oracle user numbers and puts them into a log file. How can i take this log file and import it into cacti?
a simple setup (on Unix) would be :
- create a script /tmp/display_log.sh
Code: Select all
#!/bin/sh
cat /tmp/mylog.txt
Code: Select all
exec .1.3.6.1.4.1.2021.400 /bin/sh /tmp/display_log.sh
Code: Select all
# snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.400
UCD-SNMP-MIB::ucdavis.400.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.400.2.1 = STRING: "/bin/sh"
UCD-SNMP-MIB::ucdavis.400.3.1 = STRING: "/tmp/display_log.sh"
UCD-SNMP-MIB::ucdavis.400.100.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.400.101.1 = STRING: "123"
UCD-SNMP-MIB::ucdavis.400.102.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.400.103.1 = ""
On a Windows host, you can use NRPE (Nagios Remote Plugin Executor). Here's a nrpe.cfg sample file :
Code: Select all
command[display log]=c:\windows\system32\type c:\temp\mylog.txt"
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Who is online
Users browsing this forum: No registered users and 0 guests