Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsThe reliable monitoring path on Ubuntu is MongoDB → Percona mongodb_exporter → Prometheus → Grafana. The exporter exposes MongoDB metrics on port 9216; Prometheus scrapes that endpoint; Grafana queries Prometheus for dashboards and alerts. This guide shows how to create a least-privilege monitoring account, install and test the exporter, run it under systemd, configure Prometheus, connect Grafana, and troubleshoot the common failure points.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
The walkthrough reflects setup guides available in 2026. Exporter release numbers and dashboard identifiers change, so verify the current Percona release and any dashboard import before deploying to production.
As an Amazon Associate I earn from qualifying purchases.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteHow the monitoring stack fits together
MongoDB does not send native Prometheus time series directly in this setup. The Percona mongodb_exporter process logs in to MongoDB, collects server statistics, and serves them as an HTTP metrics endpoint. Prometheus periodically requests that endpoint and stores the resulting time series. Grafana uses Prometheus as a data source, so panels and alert rules are built against the data Prometheus has retained.
On a single Ubuntu host, the usual flow is:
- MongoDB listens on its configured database port.
mongodb_exporterruns locally and listens onlocalhost:9216(or on a private interface when Prometheus is remote).- Prometheus scrapes the target with a job named
mongodb. - Grafana connects to the Prometheus HTTP URL and renders dashboards.
Keeping the exporter on the database host minimizes network exposure and makes localhost:9216 a simple scrape target. If Prometheus runs elsewhere, put the exporter and Prometheus on a private network and allow port 9216 only from the Prometheus address.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Before you install anything
Confirm the components and access
- An Ubuntu server running MongoDB and the
mongod.servicesystemd unit. - Administrative access sufficient to create one MongoDB user in the
admindatabase. - Prometheus and Grafana installed from their current official releases, either on this host or on reachable monitoring hosts.
- Permission to install a binary under
/usr/local/bin/and create a systemd unit. - A firewall or private-network policy that can restrict TCP port
9216to Prometheus.
Choose a release deliberately
Setup guides have pinned different exporter releases, including v0.40.0 and v0.42.0. Those numbers are guide-specific and should not be treated as the current release. Check the Percona releases page immediately before downloading, record the version you selected, and use the same binary for your systemd service and any test run.
| Guide pin | How to interpret it |
|---|---|
v0.40.0 |
A version used by one walkthrough; verify availability and compatibility before use. |
v0.42.0 |
A different walkthrough’s pin; verify availability and compatibility before use. |
Do not silently select an old container image merely because it appears in a copied tutorial. Prefer the current Percona exporter release and document the exact version in your deployment notes.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Create a dedicated MongoDB monitoring user
Do not give the exporter an administrator’s credentials. Create a separate account in the admin database with the two roles used by the setup guides: clusterMonitor on admin and read on local.
- Open a MongoDB shell with an account that is allowed to create users.
- Select the
admindatabase. - Create a uniquely named monitoring user with a long, randomly generated password.
- Assign
{role: 'clusterMonitor', db: 'admin'}and{role: 'read', db: 'local'}. - Store the password in your secret-management process; do not commit it to a shell script or Prometheus configuration.
A representative shell statement is:
use admin
db.createUser({ user: 'metrics', pwd: 'replace-with-a-secret', roles: [ { role: 'clusterMonitor', db: 'admin' }, { role: 'read', db: 'local' } ] })
Use the username and password only in the exporter connection URI. If authentication is enabled, make sure the URI identifies the authentication database as admin; otherwise the exporter may report an authentication failure even though the account exists.
Install Percona mongodb_exporter on Ubuntu
Download and place the binary
Download the Linux tarball for the release and architecture of your Ubuntu host from Percona’s release repository. Extract it, identify the mongodb_exporter executable, and copy that executable to /usr/local/bin/. Confirm that the file is executable and record its version.
sudo install -m 0755 mongodb_exporter /usr/local/bin/mongodb_exporter
The exact archive name and version are intentionally not fixed here because the available Percona releases change. Use the release’s own help output to confirm the connection-URI option and supported collector flags before writing the service file.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Run a foreground smoke test
Start the exporter manually with the MongoDB connection URI, --collect-all, and --compatible-mode. Keep this process in the foreground while testing so errors are visible. The URI must contain the monitoring username, password, host, and authentication database required by your MongoDB deployment.
In a second terminal, request the metrics endpoint:
curl http://localhost:9216/metrics | grep mongodb_up
A line containing mongodb_up confirms that the exporter can reach MongoDB and expose at least its basic availability metric. An empty result is not a dashboard problem; investigate the exporter process, its URI, authentication, and the listening address first.
Run the exporter safely with systemd
Keep credentials out of the process list
Put the connection string in an environment file such as /etc/default/mongodb_exporter, with ownership and permissions that prevent ordinary users from reading it. Keeping the URI out of ExecStart avoids exposing the password through the process command line and makes credential rotation easier.
Recommended Free Tools
The file should define the URI variable expected by the exporter release and the options you tested. Use the option spelling shown by that binary’s help output; releases can change flag names.
MONGODB_URI='mongodb://metrics:[email protected]:27017/?authSource=admin'
EXPORTER_OPTS='--collect-all --compatible-mode'
Protect the file, for example with root ownership and mode 0600, and ensure the service account can read it through the unit’s environment-file mechanism.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Create the unit
Create a unit that starts after MongoDB, runs as a dedicated non-root account, and restarts after a failure. One documented example uses the existing mongodb user rather than root. Adapt the ExecStart line to the URI-flag syntax supported by your selected exporter release.
[Unit]
Description=MongoDB Prometheus exporter
After=mongod.service
Requires=mongod.service
[Service]
User=mongodb
EnvironmentFile=/etc/default/mongodb_exporter
ExecStart=/usr/local/bin/mongodb_exporter --mongodb.uri=${MONGODB_URI} --collect-all --compatible-mode
Restart=on-failure
[Install]
WantedBy=multi-user.target
Save the unit as /etc/systemd/system/mongodb_exporter.service. If your release uses a differently named URI flag, replace only that flag; keep the tested collector options. Then load, enable, and start it:
sudo systemctl daemon-reload
sudo systemctl enable mongodb_exporter
sudo systemctl start mongodb_exporter
Check both the service state and its recent journal output:
systemctl status mongodb_exporter
journalctl -u mongodb_exporter -n 50 --no-pager
Repeat the curl check after the service starts. A successful systemd status without a mongodb_up metric usually means the process is running but cannot authenticate, cannot reach MongoDB, or is listening on a different address or port than expected.
Configure Prometheus to scrape MongoDB
Add a scrape job to Prometheus’ configuration. For an exporter on the same host, the target is localhost:9216. One setup uses a 30-second scrape interval and a 10-second timeout:
scrape_configs:
- job_name: 'mongodb'
scrape_interval: 30s
scrape_timeout: 10s
static_configs:
- targets: ['localhost:9216']
Use the exporter host’s private address instead of localhost when Prometheus runs on another machine. After editing the configuration, restart Prometheus using the service method for your installation. In Prometheus’ targets view, the mongodb target should be listed as UP. The target page shows the scrape error when it is not.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Validate the path in order: first fetch http://localhost:9216/metrics from the exporter host, then test the exporter host and port from the Prometheus host, and only then investigate Prometheus configuration. This separates MongoDB authentication failures from network and scrape failures.
Connect Grafana to Prometheus
- Sign in to Grafana.
- Open Configuration → Data Sources.
- Select Add data source, then choose Prometheus.
- Enter the Prometheus server URL reachable from the Grafana server.
- Save and test the data source.
A successful data-source test proves Grafana can reach Prometheus; it does not prove that MongoDB is being scraped. Confirm that the Prometheus mongodb target is up and that queries return series before debugging Grafana panels.
Import or build a dashboard
You can import a community MongoDB dashboard or create panels yourself. Dashboard identifiers and panel names change, so verify that an imported dashboard expects the metric names produced by your exporter release. A hand-built dashboard is slower initially but makes every query and threshold explicit.
Start with panels that answer operational questions:
- Is the exporter reachable? Use
mongodb_up. - Are connections approaching the server’s practical limit?
- Is a replica set member falling behind?
- Is WiredTiger cache utilization increasing toward exhaustion?
- Are scrape errors intermittent or continuous?
Use the Prometheus data source’s query editor to inspect the actual labels and series before copying a panel between environments. A panel that assumes a particular replica-set or instance label may show no data when your labels differ.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Alert on conditions that require action
The setup guidance emphasizes three alerting areas: connection saturation, replication lag, and WiredTiger cache fill percentage. Treat these as symptoms that need context rather than universal numeric thresholds. A connection count that is normal for one deployment can exhaust another, and acceptable replication lag depends on the workload and recovery objective.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Connection saturation
Alert when active connections approach the limit your application and MongoDB deployment can sustain. Pair the alert with a panel showing the recent connection trend and deployment identity. A sudden rise can indicate a connection leak, a traffic surge, or a failed pool configuration.
Replication lag
Alert when a secondary’s lag exceeds the delay your application can tolerate. Include the affected member in the alert labels so an operator can distinguish one slow secondary from a wider replication problem. Investigate disk throughput, network delay, and workload changes before simply raising the threshold.
WiredTiger cache fill
Alert on sustained high cache fill rather than a single spike. A rising percentage can precede eviction pressure and latency changes. Correlate it with query load, working-set changes, and disk behavior before taking corrective action.
Secure the exporter endpoint
Port 9216 exposes operational information and should not be open to the public internet. Restrict it with host-firewall rules or place it on a private network that only Prometheus can reach. If Prometheus is remote, allow the Prometheus host or subnet and deny other sources.
Keep MongoDB credentials in the environment file or another secret store, not in a world-readable unit, a public repository, or a dashboard URL. Run the exporter as a dedicated non-root user. Rotate the monitoring password by updating the protected environment file, restarting the exporter, and confirming that mongodb_up remains present.
Systemd binary versus Docker
The documented default is a systemd-managed binary on Ubuntu. Docker is an alternative when your operations team already standardizes on containers; one guide reports using the percona/mongodb_exporter image with the same collector flags. Treat container examples as lower-confidence than the systemd path and pin a current image version rather than using an unqualified or obsolete tag.
Free tools Windows power users keep installed
One-click scans. No signup required.
| Choice | What it provides | Important operational consideration |
|---|---|---|
| Systemd binary | A binary in /usr/local/bin/ managed by an Ubuntu unit |
Integrates with mongod.service ordering, journal logs, restart policies, and a protected environment file. |
| Docker container | The Percona exporter image with the same connection and collector options | Requires container networking, secret handling, restart policy, and a current image pin; expose port 9216 only to Prometheus. |
Do not run both versions against the same MongoDB instance unless you have a specific reason; duplicate exporters create unnecessary load and duplicate time series.
Troubleshooting by symptom
mongodb_up is missing
- Check that the exporter process is running and listening on port 9216.
- Read
journalctl -u mongodb_exporterfor URI parsing, DNS, TLS, or authentication errors. - Verify that the user was created in
adminwithclusterMonitoronadminandreadonlocal. - Run the foreground smoke test with the same URI and flags used by systemd.
Prometheus reports the target as down
- Fetch
/metricslocally on the exporter host. - From the Prometheus host, test reachability to the exporter address and TCP port.
- Check firewall rules and whether the exporter is bound only to loopback.
- Confirm that the target in the
mongodbjob matches the exporter address and port. - Check that the 10-second timeout is not being exceeded by a slow scrape.
Grafana shows “no data”
- Use Grafana’s data-source test to verify the Prometheus URL.
- Query
mongodb_updirectly in Grafana’s Explore view. - Check Prometheus for the exact metric labels emitted by your exporter version.
- Review the dashboard’s time range and datasource selection.
The service starts after reboot but MongoDB metrics fail
Confirm the unit has After=mongod.service and Requires=mongod.service, then inspect both services’ boot-time logs. Verify that the environment file exists before the exporter starts and that its permissions allow the configured service account to read it.
Operational checklist
- Record the exact Percona exporter version selected from the current release list.
- Use a dedicated MongoDB monitoring user with only the documented roles.
- Keep the URI in a protected environment file or secret manager.
- Run the exporter as a non-root account and restart it on failure.
- Confirm
mongodb_upbefore configuring Prometheus. - Use a named Prometheus job, a 30-second interval, and a 10-second timeout unless your capacity planning requires different values.
- Verify the Prometheus target is UP before importing or building Grafana panels.
- Restrict port 9216 to Prometheus.
- Alert on connection saturation, replication lag, and sustained WiredTiger cache pressure.
- Recheck dashboard queries and exporter flags whenever you upgrade the exporter.
What a healthy result looks like
A correctly configured installation has a dedicated monitoring account, a running exporter whose /metrics endpoint includes mongodb_up, a Prometheus target named mongodb in the UP state, and a Grafana Prometheus data source that returns those series. From there, dashboards and alerts are presentation and policy choices: keep the panels tied to the metrics your exporter actually emits, and tune alert thresholds to the capacity and replication guarantees of your own MongoDB deployment.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




