DEV Community

Frits Hoogland for YugabyteDB

Posted on

7

The new YugabyteDB gflags page

Starting with YugabyteDB version 2.15.3.0, the gflags (server parameters) page shows the values grouped into a number of categories.

Current situation

In versions below 2.15.3.0, the gflags are shown in the following way at the HTTP management page of the tablet servers and the masters:
HTTP management page
This is the list of gflags, with no ordering, and no indicators about the gflags, such as whether they are changed from their default value or not.

New situation

In versions starting from 2.15.3.0, the gflags screen looks like this:
Image description
In the new gflags screen, the output starts with 'NodeInfo Flags', and these are ordered alphabetically.

The new situation shows the gflags in a few categories:

NodeInfo

NodeInfo flags are flags that are tell important per node information. These flags can be default, but nevertheless the information tells vital information about the node and process' configuration on that node.

Custom

Custom flags are flags that are explicitly changed from their default value. So if you are looking for specific configuration or oddities in case of troubleshooting, this is where to look.

Auto

Auto flags are flags that get a value automatically set based on the node or process specifics.

Default

Default flags are flags that did not change from their default value.

Using the gflags page with tools

If you are using tools to read the gflags HTTP page, then the different page might mean you need to rewrite your tool. But this might not be the case!

If any tools wants to 'scrape' the gflags HTTP page, you can add ?raw to the URL, and it will output the gflags without HTML tags, simply as a list of gflags. This works both with current versions and the new 2.15.3.0 version.

But there is a better way!

The gflags JSON page

Another addition for the gflags information is the api/v1/varz endpoint. This outputs the gflags as JSON:

curl http://192.168.66.80:7000/api/v1/varz | jq
{
  "flags": [
    {
      "name": "log_filename",
      "value": "yb-master",
      "type": "NodeInfo"
    },
    {
      "name": "placement_cloud",
      "value": "local",
      "type": "NodeInfo"
    },
    {
      "name": "placement_region",
      "value": "local",
      "type": "NodeInfo"
    },
    {
      "name": "placement_zone",
      "value": "local",
      "type": "NodeInfo"
    },
...etc...
Enter fullscreen mode Exit fullscreen mode

This makes it very easy for anything that can use JSON to parse the gflags information.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (2)

Collapse
 
denismagda profile image
Denis Magda

Btw, do you know what does the "g" stand for in the "gflags"? We refer to them as server-side parameters but why "g"

Collapse
 
fritshooglandyugabyte profile image
Frits Hoogland

The 'g' stands for 'google'. We are using a google library to parse command line flags. This also explains why the raw output shows the flags with two dashes in front of the name.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay