Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Webmin Administrator's Cookbook

You're reading from   Webmin Administrator's Cookbook Over 100 recipes to leverage the features of Webmin and master the art of administering your web or database servers.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher
ISBN-13 9781849515849
Length 376 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Michal Karzynski Michal Karzynski
Author Profile Icon Michal Karzynski
Michal Karzynski
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up Your System FREE CHAPTER 2. User Management 3. Securing Your System 4. Controlling Your System 5. Monitoring Your System 6. Managing Files on Your System 7. Backing Up Your System 8. Running an Apache Web Server 9. Running a MySQL Database Server 10. Running a PostgreSQL Database Server 11. Running Web Applications 12. Setting Up an E-mail Server Index

Monitoring what Webmin is doing


One useful feature of Webmin is the fact that it keeps a log of every action it performs. It's sometimes useful to refer to this history to check how users have changed your system's configuration through Webmin's interface.

Getting ready

In order to take full advantage of Webmin's logging facility, you should enable the monitoring of file changes made though Webmin. This allows you to roll back the changes later.

In order to enable this function, go to Webmin | Webmin Configuration | Logging and set Yes as the answer to these two questions: Log changes made to files by each action? and Record all modified files before actions, for rollbacks?

How to do it...

To monitor what Webmin is doing, perform the following steps:

  1. To access Webmin's log, go to Webmin | Webmin Actions Log.

  2. Select filters to narrow your search down to log entries made today only and click Search. You will see a table listing all actions taken today through Webmin.

  3. Click on one of the actions to see a complete description of the action. This screen will inform you which user performed the action at what time, logged in from which IP, and which Webmin script was used.

  4. Add an annotation to the action by writing text to the Log entry annotation field and clicking Save. You will come across something like this:

  5. View all actions performed in this user session by clicking the link labeled Session ID. The annotated action will be visible in the list, marked with a star.

How it works...

Webmin records all actions performed by users to the log file /var/webmin/webmin.log. User annotations are stored in the /var/webmin/annotations directory. If monitoring of file changes is enabled, each change is recorded in the /var/webmin/diffs directory. Please note that these directories could potentially grow quite large over time on a busy system.

The Webmin Actions Log interface allows you to search these log files, display them, and use them to revert file changes.

There's more...

If you enabled monitoring of file changes as described in the Getting ready section of this recipe, you can use Webmin to revert the changes.

Rolling back file changes

As an exercise, go to Webmin | Webmin Configuration | User Interface and set the page background to a light blue color with the RGB hex value of C9DFFF. Go back to Webmin | Webmin Actions Log, and then find your action and view its details. In the section Files changed and commands run, you will see that a change to the file /etc/webmin/config was recorded, as shown in the following screenshot:

Tick the checkbox next to the file change and click the Roll Back Selected Files button. Confirm the rollback and go back to the Action Details page. Notice that the background color changes back to white.

See also

  • For more ways to monitor what your system is doing, take a look at Chapter 5, Monitoring Your System

You have been reading a chapter from
Webmin Administrator's Cookbook
Published in: Mar 2014
Publisher:
ISBN-13: 9781849515849
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image