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 08-12-2010, 12:56 AM   #1
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Rep: Reputation: 30
codes behind Nagios


Hi,

You know Nagios in ubuntu 9.10 (which i've already installed). The web interface for Nagios shows status of services/hosts that are currently being monitored. I supposed those (status interface) are displayed onto the page with some written codes behind. Does any one know where and how those codes can be viewed?


thank you
 
Old 08-12-2010, 01:20 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Look inside the tar you downloaded, there are the source files. The one for the statusmap is statusmap.c as pointed out by sem007 in this thread.

Kind regards,

Eric
 
Old 08-12-2010, 01:24 AM   #3
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

But how to look inside the tar? >.<
is it have to type commands in terminal?

Quote:
For that you have to change statusmap source code.

you can modify from nagios source code => cgi => statusmap.c
so this is referring to the zipped file (nagios core) i have downloaded and just extract it and look inside the folder?

thank you again(:
 
Old 08-12-2010, 01:33 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

That's correct! Unpack the file and you'll have a directory with the name of the package, such as nagios-3.2.1. Inside that directory you'll have another one called cgi and inside that one are the code files used to create the cgi files that are used for the statusmap.

Kind regards,

Eric
 
Old 08-12-2010, 01:42 AM   #5
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

Oh okay. So the statusmap refers to every interface shown in Nagios i guess.

thank you.(:
 
Old 08-12-2010, 01:55 AM   #6
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi again (lol),

Hmm, i have one question. Is it possible to actually make a new interface to appear in Nagios interface by coding on our own? I mean, we create a new C File, the same as those in tar file, and put it into tar file together with the rest and when we view Nagios interface, our file could actually be displayed?

thanks
 
Old 08-12-2010, 02:00 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I'm no programmer but I assume that if you know your way around then you can do what you want. You can change things for sure as indicated in a small part by this site.

Kind regards,

Eric
 
Old 08-12-2010, 02:19 AM   #8
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
+1 Eric

I am also not programmer but if you know programming then you can modify status map as you want.

Code:
I mean, we create a new C File, the same as those in tar file, and put it into tar file together with the rest and when we view Nagios interface, our file could actually be displayed?
BTW when you modify status map source it will not display file but it display map as per your coding.

Regards,
 
Old 08-12-2010, 02:28 AM   #9
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi sem007,

statusmap is actually the interface showing the 'UP' and 'DOWN' status for the hosts that we are monitoring am i right?

Quote:
BTW when you modify status map source it will not display file but it display map as per your coding.
Hmm, display map? As in..? sorry >.<

thank you
 
  


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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM

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

All times are GMT -5. The time now is 12: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