LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-04-2017, 04:08 AM   #1
erik__492
LQ Newbie
 
Registered: Aug 2017
Posts: 8

Rep: Reputation: Disabled
Smile Cronjob for MRTG config


Hello Guys,

I've installed MRTG on my kali linux. So far everthing okay everthing is working.

Now my question is, I want to have a cronjob that updates the configuartion file from the Switch.

And creates a new index for that configuartion.

The command for the config is:
cfgmaker --global 'WorkDir: /var/www/html/Traffic/Cisco/Cisco_39' community@ip > Cisco_39.cfg

The Cisco_39.cfg already exists, I want to overwrite it with the new cfg file.


The command for the index:
indexmaker Cisco_39.cfg > index_39.html

Here it's the same the index_39.html exists already and I want to overwrite it.

Would be glad if you can help me.


Thanks
Regards Erik
 
Old 09-04-2017, 08:25 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,873

Rep: Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600
If I understand you correctly, then those cmds will do what you want.

'>' means overwrite, '>>" means append.
I would advise you to ensure the files get backed up before being overwritten, just in case.

HTH
 
Old 09-05-2017, 01:45 AM   #3
erik__492
LQ Newbie
 
Registered: Aug 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yes okay thats now clear,

but what about that cronjob for the config file and the index file ?

Yeah I now, but in this case it doesnt matter because I can take the config file when ever I want from the switch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Which config: config.amd64-none_amd64 OR config.amd64_rt_amd64 mzsade Debian 2 11-27-2016 09:19 PM
RHEL 6.5 apache out of the box with mrtg - client denied by server configuration: /var/www/mrtg komradebob Linux - Server 1 06-30-2016 02:06 AM
MRTG config sanity check AlucardZero Linux - Server 1 02-24-2009 07:55 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 07:29 PM
mrtg: error in Config file line 18 Boudewijn Linux - Software 0 12-08-2003 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration