Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Ed Burgstaler on May 30, 2003, 09:01:38 AM
-
Here is the output I get when I try to use MRTG E-Smith/MITEL How-To
Ver. 0.7 (Dec-04-2001)
Suitable for: E-Smith 4.1.2 / Mitel SME5
[root@mail /root]# ./create-mrtg 1001 192.168.10.8
./create-mrtg: the: command not found
./create-mrtg: It: command not found
./create-mrtg: will: command not found
./create-mrtg: second: command not found
Script started, file is is
Can someone tell me what's wrong?
-
You've probably un-hashed the wrong lines, or you've just copy pasted?
If you copy pasted, the line sizes are different and you will have line that should be hashed out not being hashed.
Read the one that is only the site, and make sure the hashes are in the right place, if you still come unstuck, post the file, and I will look at it,.
Steven
-
check with howto at http://sme.swerts-knudsen.dk/
Daley
-
Thanks Steven
Now I just get a ":no such file or directory" error. Any ideas?
-
I am on way away for the weekend, sorry, but I'll see if I can see the prob on monday if you can wait that long, I'm sure i had the same problem, just got to remember
Steven
-
I have seen this problem before when you edit the create-mrtg file in Windows and then move it back to the SME server. Windows uses a different set of linebreak, CR. So make sure to edit the file in Linux (f.ex with PICO).
Rgds,
Jesper
-
The problem I had which gave me the error was because I had left out a section of the howto, make sure you have read this carefully and followed it precisely - when you do a ./create-mrtg it is looking for a directory that you were supposed to have created earlier in the howto- if this is not the problem, let me know exactly where itgives you this error, and I will try help further.
Steven
-
You were right ... I pasted the text wrong by not having my window maximized.
Problem fixed ... but why can I not monitor "localhost" the error is connection refused? Thanks again
-
That could very well be the hosts.allow template which you might not have altered :-)
Rgds,
Jesper
-
What is it that you mean Jesper ... should I have altered it and if so what should I add the external interface IP?
-
If you want to access localhost only I would change it with the following commands:
[root@e-smith ]# mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow
[root@e-smith ]# echo "snmpd: 127.0.0.1, 192.168.212.0/255.255.255.0" > /etc/e-smith/templates-custom/etc/hosts.allow/snmpd
[root@e-smith ]# /sbin/e-smith/expand-template /etc/hosts.allow
-
Jesper wrote:
> If you want to access localhost only I would change it with
> the following commands:
>
> [root@e-smith ]# mkdir -p
> /etc/e-smith/templates-custom/etc/hosts.allow
> [root@e-smith ]# echo "snmpd: 127.0.0.1,
> 192.168.212.0/255.255.255.0"
That's local network, not local host.
Charlie
-
127.0.0.1 is actually localhost. Try to do a nslookup localhost and see the resulting IP address.
Rgds,
Jesper
-
i am posting the file please check it i am getting error of no such file or directory
#!/bin/bash
#This script will create a folder inside the ibay "mrtg" which is named by the first variable. It will create a cfg file inside the /etc/mrtg #folder. It will also add a line to the script "/etc/mrtg/all-ip" so that crontab will run this script which in turn will run mrtg for each #device. The second variable is the IP address of each device to be monitored..This script is best run when "all" the workstations #connected to it are powered up because "cfgmaker" ignores inactive ports when it is run.
# EX:
# Var1 Var2
# | |
# [root@e-smith /root]# create-mrtg 10001 10.0.0.1
# Create a "workdir" for this device using the first variable
mkdir -p /home/e-smith/files/ibays/mrtg/html/$1
#create the cfg file for this Ip address using the first variable (assumes community string is "public")
perl /usr/bin/cfgmaker public@$2 --global "workdir: /home/e-smith/files/ibays/mrtg/html/$1" --output /etc/mrtg/$1.cfg
#Create an index.html file for this folder using the first variable
perl /usr/bin/indexmaker /etc/mrtg/$1.cfg > /home/e-smith/files/ibays/mrtg/html/$1/index.html
#create an entry in script "all-ip" to run mrtg for each device.
echo "/usr/bin/mrtg /etc/mrtg/$1.cfg;" >> /etc/mrtg/all-ip
#Uncommenting the line below will create a "master" index.htm inside the ibay/html directory for all devices.
#Note that this line will create a text file called index.html. This should be edited for correct html syntax.
#echo "
Traffic on ports of Device $1 " >> /home/zserver/files/ibays/mrtg/html/index.html
-
Hi,
I noticed in the last line:
/home/zserver/files/ibays/mrtg/html/index.html
should properly read:
/home/e-smith/files/ibays/mrtg/html/index.html
Rgds,
Jesper