Skip to main content

Setting up Graphios when using OMD/Check_MK

The Graphios instructions provided by the author are accurate, but for those who need some hand-holding (like me), here's the actual process (on CentOS 6.5, OMD 1.20).  If you need help, comment and I'll see what I can do.  I'm new to this, too.

  1. Install pre-reqs
    1. Tried using pip, but still had issues with post-setup, so I just cloned from github
  2. Install Graphios
    1. cd into your cloned repo
    2. python install
  3. Edit the config file
    1. edit /etc/graphios/graphios.cfg
    2. See below because blogger just isn't great for code blocks...
  4. Configure service
    1. I didn't have much luck with the post-setup, so I did this:
      1. edit /etc/init.d/graphios
      2. Paste in the contents of:
      3. Change GRAPHIOS_USER to match your OMD sitename user
      4. I changed the log file to: /var/log/graphios.log
      5. Then changed permissions/owner on that file to OMD sitename user
      6. Probably will need to set up log rotation?...
  5. Create spool dir
    1. /omd/sites/SITENAME/var/graphios/spool/
    2. If you did this as root, chown -R SITENAME:SITENAME the graphios dir
    3. This dir is specified in the pnp4nagios.cfg (as per Graphios readme) that gets edited later on in this walkthrough
  6. Re-do symlink:
    1. cd /omd/sites/cama/etc/nagios/nagios.d (or cd ~/etc/nagios/nagios.d if doing as SITENAME user)
    2. ls -al (you should see the symlink: pnp4nagios.cfg -> ../../pnp4nagios/nagios_npcdmod.cfg
    3. rm ~/etc/nagios/nagios.d/pnp4nagios.cfg
    4. ln -s ../../pnp4nagios/nagios_npcd.cfg pnp4nagios.cfg
    5. ls -al (now should be: pnp4nagios.cfg -> ../../pnp4nagios/nagios_npcd.cfg )
  7. Modify ~/etc/pnp4nagios/nagios_npcd.cfg as per Graphios readme
    1. Just tacking on the Graphios bits to the end of hostname/service template definitions
  8. Modify pnp4nagios.cfg config as per Graphios readme
    1. Did you change the sitename?  Everywhere? (like 6 times?  the readme instructions have SITENAME and prod...where your SITENAME should go)
    2. If you copy-pasta'd the command definitions in, did you change the sitename AND comment out the original commands?
  9. Start the service and tail the log
    1. service graphios start
    2. tail -f /var/log/graphios.log
    3. You should see metrics start getting processed...
Tail of the graphios log...

December 30 09:23:22 INFO Processed 2 files (0 metrics) in /omd/sites/SITENAME/var/graphios/spool/
December 30 09:23:37 INFO Processed 2 files (86 metrics) in /omd/sites/SITENAME/var/graphios/spool/
/etc/graphios/graphios.cfg - relevant settings
 # graphios log info
log_file = /var/log/graphios.log
debug = False
# use service description, most people will NOT want this, read documentation!
use_service_desc = True
enable_carbon = True
carbon_servers =

I am using the "use_service_desc = True" because it works and we're new to this.  I am assuming we'll change this going forward...


  1. Hi Chris ,

    Great howto but I,m getting following error when is send metrics to carbon :
    There is no three field.

    I think is something about my perfdata format template, can you post here one line of your perfdata file to compare with mine.

    Thank u in advance.

    1. I got this from (OMD site path)/tmp/nagios/status.dat, it's one of the services we were initially having trouble with using graphios.

      performance_data='Metric'=3716;-1;;; [cscript.exe]

      Is that what you're looking for?

  2. I mean like what the perfdata file like ( /omd/sites/***/var/graphios/spool/service-perfdata.1434645464) , mine is look like this:


    With that content I get errors from carbon log like "[graphite] 2015/06/16 17:05:28 unable to parse data: which doesn't have three fields"

    1. Sorry, see below. Also, check out this github issue for graphios, might shed some light:


      This is just a random one I pulled.

  3. Hello,

    Thanks for writing up this walk through. After following your walk through and Shaw's Readme on GitHub, I am having issues with graphios still. This is what I get when I tail the logs:

    August 04 09:29:17 DEBUG Processing spool directory /omd/sites/SITENAME/var/graphios/spool
    August 04 09:29:17 INFO Processed 0 files (0 metrics) in /omd/sites/SITENAME/var/graphios/spool
    August 04 09:29:17 DEBUG graphios sleeping.

    This log repeats about 3-4 times a minute. These are the only entries in the logs.

    Once I flip the symlink from nagios_npcdmod.cfg to nagios_npcd.cfg, all my PNP graphs break as well. If I flip it back to nagios_npcdmod.cfg, PNP graphs work again.

    If helpful, here are my graphios.cfg, nagios_npcd.cfg and pnp4nagios.cfg:

    If you have any insight about what's going on, I'd really appreciate it!

    Thank you,

    1. Jason, I think that first part means you've not set your spool dir properly. So Graphios is working, but no metrics are being dumped into the spool dir. The 3-4 times a minute makes sense with your interval being 15 (4x/minute).

      My nagios_npcd.cfg file is different from yours (did a quick WinDiff). Here's what my running config has:

      # PNP4Nagios Bulk Mode with npcd

      # service performance data

      # host performance data

      Compare the two, you should see the differences - maybe that'll do the trick?

    2. Yep, it was a bad copy/paste job, maybe it wrapped or something. Either way, thanks for the proofread!

    3. Yeah, I had issues with that at first, too - mainly because I had no grasp on what those fields were doing and was a total noob. Glad you got it working!

  4. Hello

    I have a problem with this setup maybe you can give me a help!
    I have followed all this and after a lot of hours pulling my hair out i managed to have things working, well, sort of.
    My setup is omd 1.30 and all is built in check_mk.
    I have graphite working and graphios; my spool dir is full of files, but i dont see graphios using them.

    If i run the command manually as for graphite install instructions i see the metris with correct names, but else not sure what is going on.

    1. Hey Frederico - unfortunately I've moved on from the company where this was set up, so I can't be of much help. If you are seeing the files get populated that's a good sign - perhaps it's as simple as the dir graphios is looking in is incorrect? Or maybe graphios doesn't have permissions to read?

  5. Thanks for your reply.
    Still not able to understand what is going on here...
    In grafana i see the entries fo rcheck_mk process metrics, pings to all hosts but nothing else...
    I^m not sure whats going on here.

    1. Maybe post your question on the Github repo for graphios?


Post a Comment

Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

This warning isn't documented that well on the googles, so here's some google fodder:

You are trying to set up replication for a DFS folder (no existing replication)Source server is 2008R2, 'branch office' server is 2012R2 (I'm moving all our infra to 2012R2)You have no issues getting replication configuredYou see the DFSR folders get created on the other end, but nothing stagesFinally you get EventID 4312:
The DFS Replication service failed to get folder information when walking the file system on a journal wrap or loss recovery due to repeated sharing violations encountered on a folder. The service cannot replicate the folder and files in that folder until the sharing violation is resolved.  Additional Information:  Folder: F:\Users$\\Desktop\Random Folder Name\  Replicated Folder Root: F:\Users$  File ID: {00000000-0000-0000-0000-000000000000}-v0  Replicated Folder Name: Users  Replicated Folder ID: 33F0449D-5E67-4DA1-99AC-681B5BACC7E5  Replication Group…

Fixing duplicate SPNs (service principal name)

This is a pretty handy thing to know:

SPNs are used when a specific service/daemon uses Kerberos to authenticate against AD. They map a specific service, port, and object together with this convention: class/host:port/name

If you use a computer object to auth (such as local service):

If you use a user object to auth (such as a service account, or admin account):

Why do we care about duplicate SPNs? If you have two entries trying to auth using the same Kerberos ticket (I think that's right...), they will conflict, and cause errors and service failures.

To check for duplicate SPNs:
The command "setspn.exe -X

C:\Windows\system32>setspn -X
Processing entry 7
MSSQLSvc/ is registered on these accounts:
CN=SQL Admin,OU=service accounts,OU=resources,DC=company,DC=local

found 1 groups of duplicate SPNs. (truncated/sanitized)

Note that y…

Logstash to Nagios - alerting based on Windows Event ID

This took way longer than it should have to get here's a config and brain dump...

You want to have a central place to analyze Windows Event/IIS/local application logs, alert off specific events, alert off specific situations.  You don't have the budget for a boxed solution.  You want pretty graphs.  You don't particularly care about individual server states.  (see rationale below - although you certainly have all the tools here to care, I haven't provided that configuration)

ELK stack, OMD, NXlog agent, and Rsyslog.  The premise here is as follows:

Event generated on server into EventLogNXlog ships to Logstash inputLogstash filter adds fields and tags to specified eventsLogstash output sends to a passive Nagios service via the Nagios NSCA outputThe passive service on Nagios (Check_MK c/o OMD) does its thing w. alerting
Open Monitoring Distribution, but the real point here is Check_MK (IIRC Icinga uses this...).  It makes Nagios easy to use and main…