reconfigure hosts.cfg based services.cfg,hostgroups.cfg,.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MUNIBABU
Posts: 2
Joined: Tue Dec 30, 2014 4:49 am

reconfigure hosts.cfg based services.cfg,hostgroups.cfg,.

Post by MUNIBABU »

Hi All,

While taking tar backup of hosts.cfg file , it was converted into binary file like "^@" .i tried to revert it back, but i didn't succeed.Now i decided to reconfigure based on services.cfg,hostsgroups.cfg,commands.cfg.

how can i do it?

can any one help me.


Regards,
Muni.I
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: reconfigure hosts.cfg based services.cfg,hostgroups.cfg,

Post by tmcdonald »

I might be a bit confused here, but the .tar file is just archived and the symbols you see are normal. You need to unarchive it with something like this:

Code: Select all

tar -xvf yourfile.tar
Former Nagios employee
MUNIBABU
Posts: 2
Joined: Tue Dec 30, 2014 4:49 am

Re: reconfigure hosts.cfg based services.cfg,hostgroups.cfg,

Post by MUNIBABU »

"I might be a bit confused here, but the .tar file is just archived and the symbols you see are normal. You need to unarchive it with something like this"

tar -xvf yourfile.tar

thanks for reply

i tried the above command still hosts.cfg file is in binary format.

any how i reconfigured hosts.cfg file successfully with the help of objects.cache file.


Regards,
Muni.I
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: reconfigure hosts.cfg based services.cfg,hostgroups.cfg,

Post by abrist »

Was it a zipped as well as tarred?
Run "file" on the untarred file:

Code: Select all

file <archive>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked