-1

I am trying to find out what format status file in nagios is, it has a .dat extention but is not the standard .dat ( at least not the windows .dat )

Here is an example of the format

contactstatus {
        contact_name=noc
        modified_attributes=0
        modified_host_attributes=0
        modified_service_attributes=0
        host_notification_period=24x7
        service_notification_period=24x7
        last_host_notification=0
        last_service_notification=1545078717
        host_notifications_enabled=1
        service_notifications_enabled=1
        }

contactstatus {
        contact_name=slack
        modified_attributes=0
        modified_host_attributes=0
        modified_service_attributes=0
        host_notification_period=24x7
        service_notification_period=24x7
        last_host_notification=0
        last_service_notification=1545078717
        host_notifications_enabled=1
        service_notifications_enabled=1
        }
Tim Holum
  • 697
  • 1
  • 11
  • 24
  • `/var/log/nagios/status.dat: Pascal source, ASCII text, with very long lines` – Rohlik Dec 19 '18 at 08:17
  • 3
    It's Nagios config file format. I'm not sure what other information you need. – Dave Cross Dec 19 '18 at 08:34
  • 2
    We can tell you that it's an application-specific file format, but I don't think that's likely to be much help to you. What is the actual problem you're trying to solve? Are you writing a nagios plugin and want to output its status correctly? Are you trying to parse the output of nagios plugins? Are you doing something else entirely? (And I would recommend editing the question to contain that actual problem.) – Dave Sherohman Dec 19 '18 at 10:29
  • 3
    Also see https://metacpan.org/pod/Nagios::Config for a parser for Nagios config files. – Corion Dec 19 '18 at 14:49
  • I was hoping it was a standard, that would have a node or php library for it, I ended up writting a php parser to extract the info I wanted. – Tim Holum Dec 19 '18 at 16:15
  • 1
    If you wanted a Node or PHP parser, then why did you tag this question with "perl" and not either of those? – Dave Cross Dec 20 '18 at 11:19
  • @DaveCross I tagged it with perl because the program that produced the file was perl, and I though it was some form of a standard perl file format, and I was just looking for the standard's name. – Tim Holum Dec 20 '18 at 17:50

1 Answers1

0

Found that it is not a standard, but a nagios custom format

Tim Holum
  • 697
  • 1
  • 11
  • 24