Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm in the need of monitoring in a detailed manner a MySQL dedicated Linux server that is not running apache because it's used for the database exclusively. Is it possible to install the Multi Router Traffic Grapher on it and monitor it from another server?

If not, please suggest any other free monitoring tool as good and simple as MRTG which is a very nice utility, thanks.

share|improve this question
    
As pointed out elsewhere, apache does'nt need to be installed on the server you are monitoring. In fact, you don't need a web server at all. MRTG writes out to a working directory. Browse that working directory with your web browser, and you can load pages with MRTG graphs, completely offline. –  RobW Sep 13 '11 at 21:53

4 Answers 4

up vote 2 down vote accepted

Looking at the different processes that are needed.

  1. Server A is a database server that you want to monitor in detail. You can obtain relevant stats on this machine that you want to display using MRTG but you do not want to run MRTG on this server.

  2. Server B is a server running (possibly multiple instances of) MRTG and Apache. MRTG will collect stats from a variety of servers and network devices using SNMP and other protocols, update its databases and the display pages for each statistic monitored. This server would usually also display pages relating to the structure and configuration of the network (some static, some dynamic content).

  3. There are multiple HTTP clients wanting to see the MRTG web pages on server B. If there was only one client then Apache is not needed on server B as a suitably privileged client could display the MRTG HTML files without the need for a web server (e.g. using sshfs)

So, if you have multiple clients and do not want to run the Apache (or other web server) process on Server A you have to make the statistics data available at appropriate time intervals to the MRTG process(es) on Server B. SNMP is a common way of doing this when using MRTG, not least because MRTG's origins, as the name suggests, are in monitoring network devices where SNMP is the de facto management mechanism. Servers do not always have SNMP processes running and many statistics of interest are not exposed via SNMP MIBs. Hence,

A) If the statistics you need are exposed via an SNMP MIB variable on server A and the server is running an SNMP daemon then MRTG on server B can be configured to use SNMP to obtain the variable's values. You will need to make the usual checks that the data is reliable, whether it needs any conversion (e.g. string to integer via a ConversionCode) and if it is gauge or absolute (or perhaps derive, if using RRDTool), for example.

B) Else use an external monitoring script (see MRTG documentation). The classic example is using ping on the MRTG server and graphing the results from that. However, it is equally possible to run a process on server A to collect the data, transfer it to server B (e.g. using sftp or ssh) and then reading the data via the external MRTG script (possibly after some pre-processing: e.g. a file of information can be read across from server A to server B and then split into multiple files to be read by multiple external MRTG scripts). There are scripts available that others have written and which may be suitable for a given purpose or at least give a start on writing or customising one for your particular requirement.

share|improve this answer
    
Thanks for clarifying the alternatives, I'm not sure if I have SNMP on the MySQL server (probably not) but I assume that method would be much better than constantly transferring the data and graphics from server A to B via sftp. –  Andrew Aug 27 '09 at 14:13
    
@Andrew You only move the sample data from Server A to Server B the MRTG/RRDTool database lives on Server B and the graphics are generated there. –  mas Aug 30 '09 at 9:55

MRTG works by creating HTML files - it does not, specifically, need ANY web server. ANY web server can serve the HTML files provided they are stored or copied to a location that the web server can serve up.

So, strictly speaking, yes, you can install MRTG without Apache.

share|improve this answer

You don't need Apache to install MRTG. MRTG generates HTML pages for visualization of graphics. You can send this html and png files to another server to visualize the contents.

Also you can install MRTG in another server and configure it to get the data from your DB server through SNMP. If you have more servers, maybe you need a tool like Cacti to organize all your hosts and graphics in a fashion way.

share|improve this answer

MRTG doesn't need to be on the MySQL server. It does SNMP queries so what you really want to do (if i'm reading your question right) is install SNMP on the MySQL server and MRTG + Apache/ and query the MySQL server over snmp from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.