matzarah
Nov 16 2002, 04:13 PM
I've written a perl script that goes through each virtual host on ensim and creates on urchin:
-a report for the domain
-a user account for the domain (which has permissions set to the report/domain)
-logsource for the domain
urchin has been working pretty well since I ran the script, I will probably post it on the forums later (I want to make sure it is all working fine first before distributing it). it is really useful if you don't want to add 100 domains/reports & users manually.
The HOW-TO and the script is uploaded!
Please post your comments & results with this! I would really appreciate it!
it is located at: http://www.wildfirehq.net/urchin/
it is very easy to use, it simply writes a config file which you then import into urchin.
webbcite
Nov 16 2002, 05:36 PM
Why not just post the How-To instead of the big tease...
matzarah
Nov 16 2002, 05:39 PM
heheh alright..
I need to fix up a few things...
will be up soon
matzarah
matzarah
Nov 16 2002, 06:43 PM
The HOW-TO and the script is uploaded!
Please post your comments & results with this! I would really appreciate it!
http://www.wildfirehq.net/urchin/
thanks,
matzarah
jamesp
Nov 16 2002, 07:36 PM
Thanks, worked GREAT
DeltaArc
Nov 16 2002, 11:55 PM
Matzarah's script has been running flawlessly on our machines so far.
I believe this thread *might* be a good idea to put as sticky.
Martin Enault
DeltaArc Networking
http://www.DeltaArc.net
hostpc
Nov 17 2002, 11:14 AM
Another piece of quality workmanship by a Rackshack user - thanks for the great script! Works flawlessly!
Joe
Mike2522
Nov 17 2002, 10:14 PM
How will we add new domains to urchin after we run the script? or can we just re-run the script again?
matzarah
Nov 17 2002, 10:31 PM
I will soon write a script that will write a config file for new domains. probably something like.
perl newconf domain.com
then it will make a config something like, domain.com.urchin.conf - and then you'll import it into urchin....
however, if you run the script again, and import it again, I THINK it will leave any existing records and just add the new ones (new domain/s).
Mike2522
Nov 17 2002, 11:03 PM
matzarah, i think i'll just wait for your new script. Very nice work BTW
Camper
Nov 18 2002, 01:36 AM
What great instructions even I could do it!
Camper:)
reallynicejerk
Nov 18 2002, 08:46 PM
QUOTE
Originally posted by matzarah
however, if you run the script again, and import it again, I THINK it will leave any existing records and just add the new ones (new domain/s).
Yes the import utility doesn't overwrite existing profiles unless you run it as -o (overwrite)
matzarah
Nov 19 2002, 07:06 AM
QUOTE
Originally posted by reallynicejerk
Yes the import utility doesn't overwrite existing profiles unless you run it as -o (overwrite)
yes this is correct.
Mike2522, I may be a while with the script to just write a conf for a single domain. busy time of life right now....
just re-run the script I had posted and import it again - it should work with no trouble, as the importer will only overwrite existing records if you use the -o flag.
Mike2522
Nov 19 2002, 11:13 AM
Thanks matzarah! Will do that for now as well.
redtagdeals
Nov 20 2002, 01:17 AM
QUOTE
Originally posted by matzarah
The HOW-TO and the script is uploaded!
Please post your comments & results with this! I would really appreciate it!
http://matzarah.jdmtnet.wha.la/urchin
thanks,
matzarah
worked like a charm!
DanDanFireMan
Nov 20 2002, 09:18 AM
Excellent, well done!
orca
Nov 23 2002, 04:56 PM
Yes, great work
REBIS
Nov 23 2002, 08:23 PM
Brilliant script, mate! -Reb
Aquanuke
Nov 24 2002, 10:58 PM
Thanks! brillant script, have one problem though...
Cant login to any of the accounts , ie doing
user : mydomain.com
Pass : temp123
Dosent work.. any ideas?
Thanks
matzarah
Nov 24 2002, 11:30 PM
hmm this is interesting, no one else has informed me of this problem.
make sure you're not using the
www.* infront of the domain name when logging in...
for example; mydomain.com ... not
www.mydomain.com
I can't think of any other reason for it to do this. if you want me to try and figure out the problem you'll need to let me look at your urchin admin panel.
Aquanuke
Nov 25 2002, 07:10 AM
Forget that email matzarah,
Sorry its working perfect... was because I was trying to login on domains which where aliased to the main domain :o(
All good
Thanks
Rack5
Nov 28 2002, 06:22 PM
how to get Config Generator ?
I go to
http://matzarah.jdmtnet.wha.la/urchin/confgen and then?
matzarah
Nov 28 2002, 06:33 PM
you need to have the that file, then run it.
you can either click on the link, then copy the file content into a file on your machine, or do a right click on the link and select 'save target as'. you then run the script as the how-to says.
maxihost
Dec 6 2002, 10:36 AM
hello,
I type the command
[root@mh15 util]# ./uconf-schedule
and then I set the script to update Daily
when I go to my control panel, update the page and see that all the sites are set to no schedulled and at the bottom of the page I see a message : Warning! Task scheduler disabled.
how do I turn it on ?
anybody help me !
thanks.
projectandrew
Dec 7 2002, 07:06 AM
this site seems down - anyone else have the same problem or is it just me?
matzarah
Dec 7 2002, 07:35 PM
the site was down for some hours for maintenance. sorry for any inconvenience.
BoiTaiTui
Dec 8 2002, 10:13 PM
what happen if the site removed, will urchin remove that also?
matzarah
Dec 9 2002, 02:13 AM
no. you would have to remove the site manually from urchin, and also the user.
Owen
Dec 24 2002, 07:20 PM
I tried this script but when I do this I get an error...
[root@srv001 root]# perl confgen
No such file or directory at confgen line 10.
...anyone able to help, please?
McGuri
Jan 4 2003, 10:43 AM
Your script is magical... i'm a rookie in rackshack with a new server and less of 5 minutes my Urchin multidomain READY !!!
Thanks
alex.davies
Jan 19 2003, 11:55 AM
Just in case anyone is wondering, if you add domains after having run this script you can run it again, you will simply get code like this:
CODE
record winsmith.co.uk ONE already exists, use -o option to overwrite.
record winsmith.co.uk TWO already exists, use -o option to overwrite.
record winsmith.co.uk already exists, use -o option to overwrite.
record winsmith.co.uk already exists, use -o option to overwrite.
record winsmith.co.uk already exists, use -o option to overwrite.
removed 0 records.
added 30 records.
edited 0 records.
[root@srv01 util]#
In other words, it does not overwrite/clear, just adds new domains. I dont think it removes domains that you might have deleted, though, so you might have to do that manually.
Hope this helps,
Alex
Owen
Jan 20 2003, 05:55 PM
QUOTE
Originally posted by McGuri
Your script is magical... i'm a rookie in rackshack with a new server and less of 5 minutes my Urchin multidomain READY !!!
Thanks
Yeh this is an easy thing to do, guess to of ignored it anyway as it worked perfectly anyway

.
NJHosting
Jan 24 2003, 10:41 AM
matzarah, just tried to go to the site to get script and it is down or not available. Is it going to be back up.
DeltaArc
Jan 24 2003, 02:39 PM
Greetings,
matzarah moved his site to a new domain.
I will let him know to update his posts.
The new url is :
http://www.wildfirehq.net/urchin/
Martin Enault
DeltaArc Networking
http://www.DeltaArc.net
schmoe
Jan 24 2003, 04:04 PM
I had a bunch of (non ensim) hosts to import into urchin. A few notes that others may find helpful:
http://help.urchin.com/whitepapers/scriptingconf.pdf
is very useful. It describes in some detail the format of the configuration file.
Using the "-o" flag will overwrite records in the configuration database. This can be used to replace items. Without it, the import will only add items.
To delete items and replace the configuration entirely, use the "-r" flag. Note that the documenation warns about being careful with this. You need to duplicate the "Global" settings found from the uconf-export. I never got this function to work (segmentation faults on import). The "overwrite" ended up being enough for me.
You can set the password. If you use plain-text in the ct_password field, the import will automatically encrypt it for you. If the password starts with USCC|, then the import assumes it is already encrypted (so you can keep passwords from an export).
RichPP
Feb 28 2003, 04:11 PM
Is there a way to make this run every night?
Like a cron or something?
Owen
Feb 28 2003, 05:14 PM
Yeh that would be good, wouldnt think it would be hard but wouldnt wanna rush and do it myself, as hate to mess with others scripts .etc.
DataDork
Mar 10 2003, 04:51 PM
I had some questions after initially setting up urchin on my box this morning, but thanks to you, I was able to get those annoying lingering questions answered. Oh, and your script worked like a champ!
Thanks again...
CrazyGuy
May 7 2003, 02:01 PM
when I run this script on my new server, it sets up profiles with 2 log file paths the same -
/home/virtual/domain.com/var/log/httpd/access
... but they should be
/home/virtual/domain.com/var/log/httpd/access_log
and
/home/virtual/domain.com/var/log/httpd/access_log.[1-4]
- which is how the script does it on my other (older) server.
Where does the script pick this up from - I don't think I ever configured it to do this on the other server, it "just worked", so I'm at a loss over how to set it up right on the new server.
CrazyGuy
May 13 2003, 02:07 AM
following up on my own post in case anyone shares this prob in future ...
I tracked down the problem to the confgen script. I guess I cut 'n' pasted it into an editor on the server, and the two lines that write the log names into the conf file got a spurious line break introduced - putting _log and _log.[1-4] on new lines.
Surprisingly, the script continued to run - but using the truncated log file names.
swilliams
Jun 26 2003, 11:11 AM
Great script! Got it up and running in no time.
rnccen
Jun 27 2003, 07:44 PM
Does it work with Plesk?
matzarah
Jun 27 2003, 10:58 PM
this will NOT work with plesk. its designed for Ensim only.
Nu2Linux
Jul 28 2003, 03:10 AM
Worked without a flaw (well one, don't copy from your browser into vi or pico, download the file using wget
http://.....)
Thanks!
JamesC
Aug 10 2003, 01:11 AM
link dont work all i get is a 403 page
REBIS
Aug 10 2003, 01:43 AM
Is this script compatible with Ensim Pro?
matzarah
Aug 10 2003, 02:07 AM
QUOTE
Originally posted by REBIS
Is this script compatible with Ensim Pro?
Yes.
QUOTE
Originally posted by JamesC
link dont work all i get is a 403 page
Should be fine now.
Buttercup
Aug 15 2003, 04:37 PM
Script works perfectly with Urchin 4 - does it work with Urchin 5? Thanks again for the script - it saved me a LOT of time and trouble adding all my domains.
REBIS
Aug 15 2003, 05:00 PM
This is a nice script, however, the advantages of running NightHawk's Urchin setup script is that it just enables one dom at a time. I prefer not to automatically enable Urchin on all sites.
See this thread
jameztcc
Oct 8 2003, 04:42 PM
just modify the access.log to access.log* will do away with the issues of many log files in the profile.
it worked, at on my Ensim 3.1.x... ...should not be a factor.
(Am using NightHawk's Urchin ... ..with my modification)
#! /bin/sh
DOMAINS=`/usr/local/bin/sitelookup -a domain`
SITERETVAL=$?
if [ $SITERETVAL -eq 0 ]; then
for DOMAIN in $DOMAINS
do
USER=`/usr/local/bin/sitelookup -d $DOMAIN site_admin`
/etc/appliance/customization/urchin-add.sh $DOMAIN $USER
done
fi
[root@svr1 customization]# cat urchin-add.sh
#! /bin/sh
URCHINPATH="/usr/local/urchin"
OUTPUT="/tmp/urchin-temp.conf"
DOMAIN=$1
USER=$2@$1
PASSWORD="urchin"
echo "
" > $OUTPUT
echo " ct_name=$DOMAIN" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_website=http://www.$DOMAIN" >> $OUTPUT
echo " ct_reportdomains=www.$DOMAIN,$DOMAIN" >> $OUTPUT
echo " cs_llist=$DOMAIN-access-log*" >> $OUTPUT
#echo " cs_llist=$DOMAIN-access-log,$DOMAIN-access-log.[1-4]" >> $OUTPUT
echo " ct_defaultpage=index.html" >> $OUTPUT
echo " cs_vmethod=0" >> $OUTPUT
echo " cs_ulist=$USER" >> $OUTPUT
echo "" >> $OUTPUT
echo >> $OUTPUT
echo "
" >> $OUTPUT
echo " ct_name=$DOMAIN" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " cr_frequency=4" >> $OUTPUT
echo " cr_minute=0" >> $OUTPUT
echo " cr_runnow=0" >> $OUTPUT
echo " cr_enabled=off" >> $OUTPUT
echo "" >> $OUTPUT
echo >> $OUTPUT
echo "
" >> $OUTPUT
echo " ct_name=$DOMAIN-access-log*" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_loglocation=/home/virtual/$DOMAIN/var/log/httpd/access_log*" >> $OUTPUT
echo " cs_logformat=ncsa" >> $OUTPUT
echo " cr_type=local" >> $OUTPUT
echo " cs_rlist=$DOMAIN" >> $OUTPUT
echo "" >> $OUTPUT
echo >> $OUTPUT
#echo "
" >> $OUTPUT
#echo " ct_name=$DOMAIN-access-log.[1-4]" >> $OUTPUT
#echo " ct_affiliation=(NONE)" >> $OUTPUT
#echo " ct_loglocation=/home/virtual/$DOMAIN/var/log/httpd/access_log.[1-4]" >> $OUTPUT
#echo " cs_logformat=ncsa" >> $OUTPUT
#echo " cr_type=local" >> $OUTPUT
#echo " cs_rlist=$DOMAIN" >> $OUTPUT
#echo "" >> $OUTPUT
#echo >> $OUTPUT
echo "
" >> $OUTPUT
echo " ct_affiliation=(NONE)" >> $OUTPUT
echo " ct_fullname="$DOMAIN"" >> $OUTPUT
echo " ct_name=$USER" >> $OUTPUT
echo " ct_password=$PASSWORD" >> $OUTPUT
echo " cs_rlist=$DOMAIN" >> $OUTPUT
echo "" >> $OUTPUT
$URCHINPATH/util/uconf-import -f $OUTPUT
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.