1
0
mirror of https://bitbucket.org/anguist/ntpa synced 2025-10-05 10:30:56 +00:00

Check for graph support

This commit is contained in:
2016-05-27 22:55:09 +02:00
parent 0cf8abd5c8
commit 22d9d5ed86
2 changed files with 15 additions and 0 deletions

View File

@ -52,5 +52,7 @@ namespace Ntp.Analyzer.Localize
public const string ConfigParseError = "Errors in configuration file:";
public const string LogFileError = "Cannot create log file. {0}";
public const string PidFileError = "Cannot create pid file. {0}";
public const string NoGraphBuild = "ntpa was not build with graph support but graphs are configured.";
}
}

View File

@ -227,6 +227,19 @@ namespace Ntp.Analyzer.Process
Severity.Info);
}
#if !GRAPH
foreach (HostConfiguration server in config.Servers)
{
if (server.HostGraphs.Count() != 0 ||
server.PeerGraphs.Count() != 0 ||
server.TrafficGraphs.Count() != 0)
{
initlog.WriteLine(InitializationMessage.NoGraphBuild, Severity.Warn);
break;
}
}
#endif
return true;
}