Archive
Posts from 2017
Creating XFS file systems on older Linux kernels
This past week I created a new XFS file system to test a feature and received the following error when I tried to mount it: The file system was created with the default options and the output of xfs_info looked good: The system had an existing XFS file system mounted so I decided to compare the metadata from the working file system with the one I just created. This showed one subtle differences: The working file system had the crc and ftype flags set to 0 while the non-working file system had crc set to 0 and ftype set to 1 (these are the defaults for the version of xfsprogs I was using). Re-creating the file system with ftype=0 allowed the file system to mount. I'm not one to sit back and enjoy a victory and move on…
$ read more →A couple of quick and easy ways to display JSON data on the Linux command line
I interact with RESTful services daily and periodically need to review the JSON objects exposed through one or more endpoints. There are several Linux utilities that can take a JSON object and print the object in an easily readable form. The pygmentize utility (available in the python-pygments package) can be fed a JSON object via a file or STDIN: In the output above I'm retrieving a JSON object from the Bind statistics server and feeding it to pygmentize via STDIN. Pygmentize will take the object is given and produce a nightly formatted JSON object on STDOUT…
$ read more →Exporting Bind query statistics though XML and JSON
Bind 9.10 introduced a statistics server which exports a number of useful metrics through a web UI, XML and JSON. The statistics server is configured via the "statistics-channels" directive which contains the ip and port to export statistics on and an ACL to control who can read statistics from the server. Here is a sample configuration for reference: Once the statistics server is enabled you can view the statistics in a web browser by surfing to the IP:PORT the server is configured to export statistics through. To retrieve statistics through XML or JSON you can append "/xml" or "/json" to the URL: Retrieve statistics through XML: $ Retrieve statistics through JSON: $ The statistics server exports several useful metrics…
$ read more →Using elastic's metricbeat to collect system utilization data
Over the past month I've been evaluating metricbeat. Metricbeat along with the ELK stack are incredibly powerful tools for deriving meaning from metrics and unstructured log data. Metricbeats allows you to funnel system and application metrics (e.g., CPU utilization, number of HTTP GET requests, number of SQL queries, HTTP endpoint response times, etc.) into elasticsearch and the powerful kibana visualization tool can then be used to make sense of it. To get up and running with metricbeats you will first need to configure your logstash infrastructure to support incoming beats…
$ read more →Install metricbeats with ansible and the elastic yum repository
Last month I started playing with elastic's metricbeat and you can say I fell in love at first beat. I've created some amazing visualizations with the metrics it produces and am blown away by how much visibility I can get from correlating disparate event streams. A good example of this is being able to see VMware hypervisor utilization, system utilization and HTTP endpoint latency stacked on top of each other. Elastic hosts a yum metricbeat repository and it's easy to deploy it to Fedora-derived servers with ansible's templating capabilities and the yum_repository module…
$ read more →