LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2012, 04:16 PM   #1
waelkd
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Rep: Reputation: 0
How save .cfg file


Good day guys.

i've created a date script that fetches data between two selected dates on my desktop.

now i have no idea how to copy it via linux command line. how to upload , where to save it .


any help on this is greatly appreciated.

thanks
 
Old 05-07-2012, 06:11 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
It would help enormously if you showed your script and and example of what you want as a result.
Its not entirely clear from your description
 
Old 05-08-2012, 06:00 AM   #3
waelkd
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
It would help enormously if you showed your script and and example of what you want as a result.
Its not entirely clear from your description

fair enough, the img link below has two pictures, the one to the left is the script header, where the active sript is inside it.


now everytime i try to load it through centreon "the platform i use" it tells me the command line needs to be inside libexec.

now i am inside libexec , but i have no idea , how to create the file "whether with VI or CAT" and how to save it inside libexec.

http://imgur.com/ibUiq
 
Old 05-08-2012, 07:43 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, that certainly looks like nagios, but I'm (still) not clear what you are trying to achieve.
I always work at the cmd line (our servers don't have a gui), maybe the following will help
Code:
# nagios checking plugin cmds/tools eg check_mysql are in /usr/local/nagios/libexec

-rwxr-xr-x. 1 nagios nagios 129404 Jan 13 11:00 check_mysql
-rwxr-xr-x. 1 nagios nagios 122442 Jan 13 11:00 check_mysql_query

# for a local system check in eg /usr/local/nagios/etc/objects

local_hosts.cfg:        check_command       check_local_mysql!user!passwd
local_hosts.cfg:        check_command       check_local_mysql_query!'select 1'!user!passwd
The cfg file is plain text, so cp to copy vi to edit.

HTH

Seriously though, if you do it from the cli, its much simpler and easier for us to help you.
 
Old 05-09-2012, 01:24 AM   #5
waelkd
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Well, that certainly looks like nagios, but I'm (still) not clear what you are trying to achieve.
I always work at the cmd line (our servers don't have a gui), maybe the following will help
Code:
# nagios checking plugin cmds/tools eg check_mysql are in /usr/local/nagios/libexec

-rwxr-xr-x. 1 nagios nagios 129404 Jan 13 11:00 check_mysql
-rwxr-xr-x. 1 nagios nagios 122442 Jan 13 11:00 check_mysql_query

# for a local system check in eg /usr/local/nagios/etc/objects

local_hosts.cfg:        check_command       check_local_mysql!user!passwd
local_hosts.cfg:        check_command       check_local_mysql_query!'select 1'!user!passwd
The cfg file is plain text, so cp to copy vi to edit.

HTH

Seriously though, if you do it from the cli, its much simpler and easier for us to help you.
Thanks man, vi worked fine and found cat and tail also as an edit commands.

but now am having a new problem "no idea why this happens to me" anyways i logged into our centreon platform went to add host tab , added a test host , refreshed the page to save it, and poof got a blank page, now everytime i click the Hosts tab i get a blank page.


"please follow link"

http://i.imgur.com/t6sYR.jpg


with host tab not working i cant delete,edit,add any new hosts/servers and i have no idea what to do.

An idea crossed my find ,is it possible to delete the new host i made from root via ssh?

Last edited by waelkd; 05-09-2012 at 01:26 AM.
 
Old 05-09-2012, 08:07 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
2 options:

1. if you're going to use the Centreon GUI, try their forums for a faster response http://forum.centreon.com/

2. learn the cli; most 'real' servers don't have a GUI, so if you intend to use this in a job one day, you might as well start learning now.

As above, we don't have GUI's at work, so I can't help with that; sorry.
 
Old 05-10-2012, 02:34 AM   #7
waelkd
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
2 options:

1. if you're going to use the Centreon GUI, try their forums for a faster response http://forum.centreon.com/

2. learn the cli; most 'real' servers don't have a GUI, so if you intend to use this in a job one day, you might as well start learning now.

As above, we don't have GUI's at work, so I can't help with that; sorry.

man, if you search waelkd username in centreon forums, ull see around 8 threads made by me on this issue. but no one answers
 
  


Reply



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
grub.cfg file in grub2 sheine Linux - Software 2 01-22-2011 12:06 PM
[SOLVED] how to the give path of the part.cfg file in %include command in ks.cfg. YOGESHAS87 Linux - Newbie 2 01-11-2011 04:33 AM
[SOLVED] Nagios dependencies.cfg example file rutledgetome Linux - Software 2 03-17-2010 11:08 AM
Creating Threads Via a cfg file HELP! mhogue Linux - Software 1 01-11-2010 04:44 PM
CFG File Get_ConnEcTed Linux - Server 1 07-30-2007 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:54 AM.

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