Changeset 83c2453 in nscp
- Timestamp:
- 03/26/12 21:59:55 (14 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 8d89d7a
- Parents:
- 822454f
- Files:
-
- 23 edited
-
changelog (modified) (1 diff)
-
helpers/installers/installer/Product.wxs (modified) (7 diffs)
-
helpers/installers/installer/properties.wxs (modified) (1 diff)
-
include/execute_process_w32.hpp (modified) (2 diffs)
-
include/nscapi/nscapi_protobuf_functions.cpp (modified) (4 diffs)
-
include/nscapi/nscapi_protobuf_functions.hpp (modified) (1 diff)
-
include/nscapi/nscapi_targets.hpp (modified) (2 diffs)
-
include/settings/client/settings_client.hpp (modified) (2 diffs)
-
include/settings/settings_handler_impl.hpp (modified) (3 diffs)
-
include/strEx.h (modified) (1 diff)
-
modules/CheckEventLog/CheckEventLog.cpp (modified) (2 diffs)
-
modules/CheckExternalScripts/CheckExternalScripts.cpp (modified) (3 diffs)
-
modules/CheckExternalScripts/CheckExternalScripts.h (modified) (2 diffs)
-
modules/GraphiteClient/GraphiteClient.cpp (modified) (7 diffs)
-
modules/GraphiteClient/GraphiteClient.h (modified) (4 diffs)
-
modules/NRPEClient/NRPEClient.cpp (modified) (1 diff)
-
modules/NRPEServer/NRPEServer.cpp (modified) (5 diffs)
-
scripts/CMakeLists.txt (modified) (1 diff)
-
service/NSClient++.cpp (modified) (2 diffs)
-
service/cli_parser.hpp (modified) (3 diffs)
-
service/settings_client.hpp (modified) (2 diffs)
-
version.hpp (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
changelog
r822454f r83c2453 4 4 * Fixa dependonservice LanManWorkStation (old win) 5 5 * Fix RtlStringFromGUID problem on NT4 6 7 8 2012-03-26 MickeM 9 * Fixed perfoamcen data parsing issue 10 * Fixed external scripts perfoamcen data issue 11 * Fixed boolen flag handling in settings (default generated as false regardless of actual state) 12 * Fixed so "advanced properties" are not generated with --update-defalts 13 * Added some "advanced properties" here and there 14 * Fixed path handling for object 15 16 2012-03-25 MickeM 17 * Added last few features to the GraphitePlugin (which is now usable) 18 * Tweaked nscp settings command line syntax a bit to be more flexible and usable... 6 19 7 20 2012-03-20 MickeM -
helpers/installers/installer/Product.wxs
r822454f r83c2453 3 3 4 4 <?if "$(var.arch)" = "x64"?> 5 <?define Postfix.GUID = "DD5862EE637C" ?> 6 <?define ProgramFiles = "ProgramFiles64Folder" ?> 7 <?define Win64 = "yes" ?> 8 <?define Plattform = "x64" ?> 5 <?define ProgramFiles = "ProgramFiles64Folder" ?> 6 <?define Win64 = "yes" ?> 7 <?define Plattform = "x64" ?> 9 8 <?else?> 10 <?define Postfix.GUID = "DD5862EE637B" ?> 11 <?define ProgramFiles = "ProgramFilesFolder" ?> 12 <?define Win64 = "no" ?> 13 <?define Plattform = "x86" ?> 9 <?define ProgramFiles = "ProgramFilesFolder" ?> 10 <?define Win64 = "no" ?> 11 <?define Plattform = "x86" ?> 14 12 <?endif?> 15 13 16 14 <?define Version.String = "$(var.Version.Major).$(var.Version.Minor).$(var.Version.Revision).$(var.Version.Build)" ?> 17 15 <?define UpgradeCode = "0B36E3B7-0042-452d-B376-57E0C07ADDAA" ?> 18 16 19 17 <?include config.wxs ?> 20 18 … … 30 28 31 29 <?if "$(var.arch)" = "x64"?> 32 <Condition Message="x64 bit version not supported on Win32 bit platform (get Win32 instead)">VersionNT64</Condition>30 <Condition Message="x64 bit version not supported on Win32 bit platform (get Win32 instead)">VersionNT64</Condition> 33 31 <?endif?> 34 32 <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" CompressionLevel="high" /> 35 33 <Directory Id="TARGETDIR" Name="SourceDir"> 36 <Directory Id="$(var.ProgramFiles)">37 <Directory Id="INSTALLLOCATION" Name="$(var.App.Path)">38 <Component Id="MainClient" Guid="F6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">39 <File Id="NSClientEXE" Name="nscp.exe" DiskId="1" KeyPath="yes"34 <Directory Id="$(var.ProgramFiles)"> 35 <Directory Id="INSTALLLOCATION" Name="$(var.App.Path)"> 36 <Component Id="MainClient" Guid="5C45463A-4AE9-4325-96DB-6E239C034F93" Win64="$(var.Win64)"> 37 <File Id="NSClientEXE" Name="nscp.exe" DiskId="1" KeyPath="yes" 40 38 Source="$(var.Source)/nscp.exe" Vital="yes"> 41 <Shortcut Id="StartmenuNSClientTest" Directory="ProgramMenuDir" 42 Name="$(var.App.Title) ($(var.arch), test)" WorkingDirectory="INSTALLDIR" Icon="nscp.exe" 43 Advertise="yes" IconIndex="0" Arguments="test" Description="Run $(var.App.Title) in test mode" /> 44 <fire:FirewallException Id="FWX1" Name="NSClient++ Monitoring Agent" Scope="any" IgnoreFailure="yes" /> 45 </File> 46 <RemoveFile Id="PurgeLogFiles" Name="*.log" On="uninstall" /> 47 <ServiceInstall Id="SWCNSCP" 39 <fire:FirewallException Id="FWX1" Name="NSClient++ Monitoring Agent" Scope="any" IgnoreFailure="yes" /> 40 </File> 41 <RemoveFile Id="PurgeLogFiles" Name="*.log" On="uninstall" /> 42 <ServiceInstall Id="SWCNSCP" 48 43 Name="[SERVICE_NAME]" DisplayName="$(var.App.Title) ($(var.arch))" 49 44 Type="ownProcess" Start="auto" ErrorControl="normal" Interactive="no" 50 45 Description="Monitoring agent for nagios (and others) used to respond to status queries" 51 46 Arguments="service --run --name [SERVICE_NAME]"> 52 <!-- 53 <ServiceDependency Id="Tcpip" /> 54 --> 55 </ServiceInstall> 56 <ServiceControl Id="StartSWCNSCP" Name="[SERVICE_NAME]" Start="install" Stop="both" Wait="yes" Remove="uninstall" /> 57 <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" /> 58 </Component> 59 <Component Id="Shortcuts" Guid="E6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 60 <Shortcut Id="StartmenuNSClientStart" Directory="ProgramMenuDir" Name="Start $(var.App.Title) ($(var.arch))" 47 <!--<ServiceDependency Id="Tcpip" />--> 48 </ServiceInstall> 49 <ServiceControl Id="StartSWCNSCP" Name="[SERVICE_NAME]" Start="install" Stop="both" Wait="yes" Remove="uninstall" /> 50 <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" /> 51 </Component> 52 <Component Id="Shortcuts" Guid="4BCF8026-B209-4d33-B323-5B2ACC43A258" Win64="$(var.Win64)"> 53 <Shortcut Id="StartmenuNSClientTest" Directory="ProgramMenuDir" Name="$(var.App.Title) ($(var.arch), test)" 54 WorkingDirectory="INSTALLDIR" Icon="nscp.exe" IconIndex="0" 55 Arguments="test" Description="Run $(var.App.Title) in test mode" /> 56 <Shortcut Id="StartmenuNSClientStart" Directory="ProgramMenuDir" Name="Start $(var.App.Title) ($(var.arch))" 61 57 WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0" 62 58 Arguments="service --name [SERVICE_NAME] --start" Description="Start the $(var.App.Title) service" /> 63 <Shortcut Id="StartmenuNSClientStop" Directory="ProgramMenuDir" Name="Stop $(var.App.Title) ($(var.arch))"59 <Shortcut Id="StartmenuNSClientStop" Directory="ProgramMenuDir" Name="Stop $(var.App.Title) ($(var.arch))" 64 60 WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0" 65 61 Arguments="service --name [SERVICE_NAME] --stop" Description="Stop the $(var.App.Title) service" /> 66 <Shortcut Id="StarmentNSCHelp" Directory="ProgramMenuDir" Name="Documentation"62 <Shortcut Id="StarmentNSCHelp" Directory="ProgramMenuDir" Name="Documentation" 67 63 Target="[HELP_LINK]" Icon="doc.ico" 68 64 Description="Visit the NSClient++ WIKI for documentation"> 69 </Shortcut> 70 <RegistryValue Root="HKCU" Key="Software\NSClient++\Installer" Name="shortcuts" Type="integer" Value="1" KeyPath="yes"/> 71 </Component> 72 <Component Id="Helpers" Guid="A6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 73 <!-- 74 <File Id="NSClientTRAY" Name="nstray.exe" DiskId="1" 75 Source="$(var.Source)/nstray.exe" Vital="yes"> 76 <Shortcut Id="StartmenuNSClientTray" Directory="ProgramMenuDir" Name="NSCPTray" 77 LongName="$(var.App.Title) ($(var.arch)) system tray)" WorkingDirectory="INSTALLDIR" Icon="nstray.exe" 78 IconIndex="0" Description="Start the $(var.App.Title) systemtray agent"/> 65 </Shortcut> 66 <RegistryValue Root="HKCU" Key="Software\NSClient++\Installer" Name="shortcuts" Type="integer" Value="1" KeyPath="yes"/> 67 </Component> 68 <Component Id="Helpers" Guid="AEBD660B-C62A-4af6-9A61-693D319BC224" Win64="$(var.Win64)"> 69 <File Id="ErrorReporter" Name="reporter.exe" DiskId="1" Source="$(var.Source)/reporter.exe" Vital="yes" /> 70 </Component> 71 <Component Id="SampleConfigUser" Guid="BF040814-8FAB-47b9-B700-1E1F0BF420FC" Win64="$(var.Win64)"> 72 <File Id="NSClientINIUser" Name="nsclient.ini" DiskId="1" Source="$(var.Path.ini)/nsclient.dist" Vital="no" PatchIgnore="yes"> 73 <Permission User="[USERGROUP_USERS]" GenericRead="yes" Read="yes" GenericWrite="yes" Write="yes"/> 79 74 </File> 80 --> 81 <File Id="ErrorReporter" Name="reporter.exe" DiskId="1" Source="$(var.Source)/reporter.exe" Vital="yes" /> 82 </Component> 83 <Component Id="SampleConfigUser" Guid="AA636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 84 <File Id="NSClientINIUser" Name="nsclient.ini" DiskId="1" Source="$(var.Path.ini)/nsclient.dist" Vital="no" PatchIgnore="yes"> 85 <Permission User="[USERGROUP_USERS]" GenericRead="yes" Read="yes" GenericWrite="yes" Write="yes"/> 86 </File> 87 <RemoveFile Id="PurgeConfigFilesUser" Name="*.ini" On="uninstall" /> 88 <Condition>INSTALL_SAMPLE_CONFIG AND USER_WRITABLE_CONFIG</Condition> 89 </Component> 90 <Component Id="SampleConfig" Guid="AAA36DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 91 <File Id="NSClientINI" Name="nsclient.ini" DiskId="1" Source="$(var.Path.ini)/nsclient.dist" Vital="no" PatchIgnore="yes" /> 92 <RemoveFile Id="PurgeConfigFiles" Name="*.ini" On="uninstall" /> 93 <Condition>INSTALL_SAMPLE_CONFIG AND NOT USER_WRITABLE_CONFIG</Condition> 94 </Component> 95 <Component Id="RandomFiles" Guid="B4636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 96 <File Id="Changelog" Name="changelog.txt" DiskId="1" Source="$(var.Source)/changelog" Vital="no" /> 97 <File Id="Counters" Name="counters.defs" DiskId="1" Source="$(var.Source)/counters.defs" Vital="no" /> 98 <File Id="License" Name="license.txt" DiskId="1" Source="$(var.Source)/license.txt" Vital="no" KeyPath="yes" /> 99 <File Id="settingsMap" Name="old-settings.map" DiskId="1" Source="$(var.Source)/old-settings.map" Vital="no" /> 100 101 <RemoveFile Id="LogFile1" Name="nsclient.log" On="uninstall" /> 102 <RemoveFile Id="LogFile2" Name="nsc.log" On="uninstall" /> 103 <RemoveFile Id="OldConfig" Name="nsc.old" On="uninstall" /> 104 <RemoveFile Id="NewConfig" Name="nsc.new" On="uninstall" /> 105 </Component> 106 <Component Id="NagiosDocumentation" Guid="9B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 107 <File Id="doc.usage.nagios" Name="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/docs/Nagios Usage Guide.pdf" Vital="no" KeyPath="yes"> 108 <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="Nagios Usage Guide" Advertise="yes" 75 <RemoveFile Id="PurgeConfigFilesUser" Name="*.ini" On="uninstall" /> 76 <Condition>INSTALL_SAMPLE_CONFIG AND USER_WRITABLE_CONFIG</Condition> 77 </Component> 78 <Component Id="SampleConfig" Guid="73B35DA2-C6D5-45d4-940F-E7D3CACB2ACF" Win64="$(var.Win64)"> 79 <File Id="NSClientINI" Name="nsclient.ini" DiskId="1" Source="$(var.Path.ini)/nsclient.dist" Vital="no" PatchIgnore="yes" /> 80 <RemoveFile Id="PurgeConfigFiles" Name="*.ini" On="uninstall" /> 81 <Condition>INSTALL_SAMPLE_CONFIG AND NOT USER_WRITABLE_CONFIG</Condition> 82 </Component> 83 <Component Id="RandomFiles" Guid="E23865C3-C11F-4d11-BE63-C670D60B0CD0" Win64="$(var.Win64)"> 84 <File Id="Changelog" Name="changelog.txt" DiskId="1" Source="$(var.Source)/changelog" Vital="no" /> 85 <File Id="Counters" Name="counters.defs" DiskId="1" Source="$(var.Source)/counters.defs" Vital="no" /> 86 <File Id="License" Name="license.txt" DiskId="1" Source="$(var.Source)/license.txt" Vital="no" KeyPath="yes" /> 87 <File Id="settingsMap" Name="old-settings.map" DiskId="1" Source="$(var.Source)/old-settings.map" Vital="no" /> 88 89 <RemoveFile Id="LogFile1" Name="nsclient.log" On="uninstall" /> 90 <RemoveFile Id="LogFile2" Name="nsc.log" On="uninstall" /> 91 <RemoveFile Id="OldConfig" Name="nsc.old" On="uninstall" /> 92 <RemoveFile Id="NewConfig" Name="nsc.new" On="uninstall" /> 93 </Component> 94 <Component Id="NagiosDocumentation" Guid="DE136675-CBBD-49c4-B3DB-B3D5DA90BDD1" Win64="$(var.Win64)"> 95 <File Id="doc.usage.nagios" Name="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/docs/Nagios Usage Guide.pdf" Vital="no" KeyPath="yes"> 96 <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="Nagios Usage Guide" Advertise="yes" 109 97 WorkingDirectory="INSTALLDIR" Description="Nagios Usage Guide"/> 110 </File>111 </Component>112 <Component Id="ReferenceDocumentation" Guid="8B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)">113 <File Id="doc.reference" Name="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/docs/NSClient++ Reference Manual.pdf" Vital="no" KeyPath="yes">114 <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="NSClient++ Reference Manual" Advertise="yes"98 </File> 99 </Component> 100 <Component Id="ReferenceDocumentation" Guid="C1F07CBC-2D5A-49c1-8A52-A48FFBDD692B" Win64="$(var.Win64)"> 101 <File Id="doc.reference" Name="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/docs/NSClient++ Reference Manual.pdf" Vital="no" KeyPath="yes"> 102 <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="NSClient++ Reference Manual" Advertise="yes" 115 103 WorkingDirectory="INSTALLDIR" Description="NSClient++ Reference Manual"/> 116 </File> 117 </Component> 118 <Directory Id="INSTALLLOCATION_SECURITY" Name="security"> 119 <Component Id="NRPEServerCert" Guid="5A0246F8-5167-45db-2E46-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 120 <File Id="NRPECert" Name="nrpe_dh_512.pem" DiskId="1" Source="$(var.Source)/security/nrpe_dh_512.pem" Vital="no"/> 121 </Component> 122 </Directory> 123 <Directory Id="INSTALLLOCATION_MODS" Name="modules"> 124 <Component Id="NRPEServer" Guid="5A0246F8-5167-45db-B246-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 125 <File Id="NRPEServerDLL" Name="NRPEServer.dll" DiskId="1" Source="$(var.Source)/modules/NRPEServer.dll" Vital="no" /> 126 <File Id="NRPEClientDLL" Name="NRPEClient.dll" DiskId="1" Source="$(var.Source)/modules/NRPEClient.dll" Vital="no" /> 127 </Component> 128 <Component Id="NSCServer" Guid="6DAF8BB9-9A56-48f5-B2C5-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 129 <File Id="NSCServerDLL" Name="NSClientServer.dll" DiskId="1" Source="$(var.Source)/modules/NSClientServer.dll" Vital="no" /> 130 </Component> 131 <Component Id="NSCA" Guid="8820A304-C596-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 132 <File Id="NSCAClientDLL" Name="NSCAClient.dll" DiskId="1" Source="$(var.Source)/modules/NSCAClient.dll" Vital="no" /> 133 <File Id="NSCAServerDLL" Name="NSCAServer.dll" DiskId="1" Source="$(var.Source)/modules/NSCAServer.dll" Vital="no" /> 134 <File Id="SchedulerDLL" Name="Scheduler.dll" DiskId="1" Source="$(var.Source)/modules/Scheduler.dll" Vital="no" /> 135 </Component> 136 <Component Id="NSCP" Guid="B185B8F1-3718-4e8e-ADA4-38049A0721EA" Win64="$(var.Win64)"> 137 <File Id="NSCPClientDLL" Name="NSCPClient.dll" DiskId="1" Source="$(var.Source)/modules/NSCPClient.dll" Vital="no" /> 138 <File Id="NSCPServerDLL" Name="NSCPServer.dll" DiskId="1" Source="$(var.Source)/modules/NSCPServer.dll" Vital="no" /> 139 </Component> 140 <Component Id="PythonScript" Guid="8820A304-C696-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 141 <File Id="PythonScript" Name="PythonScript.dll" DiskId="1" Source="$(var.Source)/modules/PythonScript.dll" Vital="no" /> 142 </Component> 143 <Component Id="ExtraClients" Guid="8820A304-C696-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 144 <File Id="GraphiteClient" Name="GraphiteClient.dll" DiskId="1" Source="$(var.Source)/modules/GraphiteClient.dll" Vital="no" /> 145 <File Id="SMTPClient" Name="SMTPClient.dll" DiskId="1" Source="$(var.Source)/modules/SMTPClient.dll" Vital="no" /> 146 <File Id="SyslogClient" Name="SyslogClient.dll" DiskId="1" Source="$(var.Source)/modules/SyslogClient.dll" Vital="no" /> 147 </Component> 148 <Component Id="Plugins" Guid="9B490E67-5472-4266-96DC-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 149 <File Id="ModCheckEventLog.dll" Name="CheckEventLog.dll" DiskId="1" Source="$(var.Source)/modules/CheckEventLog.dll" Vital="no" /> 150 <File Id="ModCheckExternalScripts.dll" Name="CheckExternalScripts.dll" DiskId="1" Source="$(var.Source)/modules/CheckExternalScripts.dll" Vital="no" /> 151 <File Id="ModCheckHelpers.dll" Name="CheckHelpers.dll" DiskId="1" Source="$(var.Source)/modules/CheckHelpers.dll" Vital="no" /> 152 <File Id="ModCheckSystem.dll" Name="CheckSystem.dll" DiskId="1" Source="$(var.Source)/modules/CheckSystem.dll" Vital="no" /> 153 <File Id="ModCheckWMI.dll" Name="CheckWMI.dll" DiskId="1" Source="$(var.Source)/modules/CheckWMI.dll" Vital="no" /> 154 <File Id="ModFileLogger.dll" Name="FileLogger.dll" DiskId="1" Source="$(var.Source)/modules/FileLogger.dll" Vital="no" /> 155 <File Id="ModLUAScript.dll" Name="LUAScript.dll" DiskId="1" Source="$(var.Source)/modules/LUAScript.dll" Vital="no" /> 156 <File Id="ModCheckNSCP.dll" Name="CheckNSCP.dll" DiskId="1" Source="$(var.Source)/modules/CheckNSCP.dll" Vital="no" /> 157 <File Id="ModCheckDisk.dll" Name="CheckDisk.dll" DiskId="1" Source="$(var.Source)/modules/CheckDisk.dll" Vital="no" /> 158 <File Id="ModCheckTaskSched.dll" Name="CheckTaskSched.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched.dll" Vital="no" /> 159 <File Id="ModCheckTaskSched2.dll" Name="CheckTaskSched2.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched2.dll" Vital="no" /> 160 </Component> 161 </Directory> 162 <Directory Id="INSTALLLOCATION_SCRIPTS" Name="scripts"> 163 <Component Id="Scripts" Guid="9B490E67-5472-4268-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 164 <File Id="script001" Name="check_60s.bat" DiskId="1" Source="$(var.Source)/scripts/check_60s.bat" Vital="no" /> 165 <File Id="script002" Name="check_battery.vbs" DiskId="1" Source="$(var.Source)/scripts/check_battery.vbs" Vital="no" /> 166 <File Id="script003" Name="check_files.vbs" DiskId="1" Source="$(var.Source)/scripts/check_files.vbs" Vital="no" /> 167 <File Id="script004" Name="check_no_rdp.bat" DiskId="1" Source="$(var.Source)/scripts/check_no_rdp.bat" Vital="no" /> 168 <File Id="script005" Name="check_printer.vbs" DiskId="1" Source="$(var.Source)/scripts/check_printer.vbs" Vital="no" /> 169 <File Id="script006" Name="check_ok.bat" DiskId="1" Source="$(var.Source)/scripts/check_ok.bat" Vital="no" /> 170 <File Id="script007" Name="check_ping.bat" DiskId="1" Source="$(var.Source)/scripts/check_ping.bat" Vital="no" /> 171 <File Id="script008" Name="check_updates.vbs" DiskId="1" Source="$(var.Source)/scripts/check_updates.vbs" Vital="no" /> 172 <File Id="sample001" Name="check_test.ps1" DiskId="1" Source="$(var.Source)/scripts/check_test.ps1" Vital="no" /> 173 <File Id="sample002" Name="check_test.vbs" DiskId="1" Source="$(var.Source)/scripts/check_test.vbs" Vital="no" /> 174 <!-- 175 Scripts missing 176 <File Id="sample003" Name="check_test.bat" DiskId="1" Source="$(var.Source)/scripts/check_test.bat" Vital="no" /> 177 <File Id="lua001" Name="test.lua" LongName="test.lua" DiskId="1" Source="$(var.Source)/scripts/test.lua" Vital="no" /> 178 --> 179 </Component> 180 <Directory Id="INSTALLLOCATION_SCRIPTS_LIB" Name="lib"> 181 <Component Id="ScriptLibs" Guid="9B490E67-5472-4267-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 182 <File Id="lib001" Name="NagiosPlugins.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/NagiosPlugins.vbs" Vital="no" /> 183 <File Id="lib002" Name="wrapper.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/wrapper.vbs" Vital="no" /> 104 </File> 105 </Component> 106 <Directory Id="INSTALLLOCATION_SECURITY" Name="security"> 107 <Component Id="NRPEServerCert" Guid="4129415B-4907-4c63-A7D7-4EF7B37969D1" Win64="$(var.Win64)"> 108 <File Id="NRPECert" Name="nrpe_dh_512.pem" DiskId="1" Source="$(var.Source)/security/nrpe_dh_512.pem" Vital="no"/> 109 </Component> 110 </Directory> 111 <Directory Id="INSTALLLOCATION_MODS" Name="modules"> 112 <Component Id="NRPEServer" Guid="E00E8CFD-ADA6-47bd-84F0-DD00F07AD326" Win64="$(var.Win64)"> 113 <File Id="NRPEServerDLL" Name="NRPEServer.dll" DiskId="1" Source="$(var.Source)/modules/NRPEServer.dll" Vital="no" /> 114 <File Id="NRPEClientDLL" Name="NRPEClient.dll" DiskId="1" Source="$(var.Source)/modules/NRPEClient.dll" Vital="no" /> 115 </Component> 116 <Component Id="NSCServer" Guid="64CEEE94-4E45-48ca-B120-81DA3F3E081A" Win64="$(var.Win64)"> 117 <File Id="NSCServerDLL" Name="NSClientServer.dll" DiskId="1" Source="$(var.Source)/modules/NSClientServer.dll" Vital="no" /> 118 </Component> 119 <Component Id="NSCA" Guid="C2C9E95A-28A6-4ea0-BF71-73B8CE509369" Win64="$(var.Win64)"> 120 <File Id="NSCAClientDLL" Name="NSCAClient.dll" DiskId="1" Source="$(var.Source)/modules/NSCAClient.dll" Vital="no" /> 121 <File Id="NSCAServerDLL" Name="NSCAServer.dll" DiskId="1" Source="$(var.Source)/modules/NSCAServer.dll" Vital="no" /> 122 <File Id="SchedulerDLL" Name="Scheduler.dll" DiskId="1" Source="$(var.Source)/modules/Scheduler.dll" Vital="no" /> 123 </Component> 124 <Component Id="NSCP" Guid="B185B8F1-3718-4e8e-ADA4-38049A0721EA" Win64="$(var.Win64)"> 125 <File Id="NSCPClientDLL" Name="NSCPClient.dll" DiskId="1" Source="$(var.Source)/modules/NSCPClient.dll" Vital="no" /> 126 <File Id="NSCPServerDLL" Name="NSCPServer.dll" DiskId="1" Source="$(var.Source)/modules/NSCPServer.dll" Vital="no" /> 127 </Component> 128 <Component Id="PythonScript" Guid="49C2120D-634D-48ef-B82E-F2E9B219A768" Win64="$(var.Win64)"> 129 <File Id="PythonScript" Name="PythonScript.dll" DiskId="1" Source="$(var.Source)/modules/PythonScript.dll" Vital="no" /> 130 </Component> 131 <Component Id="ExtraClients" Guid="57D203AF-0A5F-4fca-BA6E-8B8767F97B8D" Win64="$(var.Win64)"> 132 <File Id="GraphiteClient" Name="GraphiteClient.dll" DiskId="1" Source="$(var.Source)/modules/GraphiteClient.dll" Vital="no" /> 133 <File Id="SMTPClient" Name="SMTPClient.dll" DiskId="1" Source="$(var.Source)/modules/SMTPClient.dll" Vital="no" /> 134 <File Id="SyslogClient" Name="SyslogClient.dll" DiskId="1" Source="$(var.Source)/modules/SyslogClient.dll" Vital="no" /> 135 </Component> 136 <Component Id="Plugins" Guid="BBE40548-4061-43fc-A720-96BFFDEFD34E" Win64="$(var.Win64)"> 137 <File Id="ModCheckEventLog.dll" Name="CheckEventLog.dll" DiskId="1" Source="$(var.Source)/modules/CheckEventLog.dll" Vital="no" /> 138 <File Id="ModCheckExternalScripts.dll" Name="CheckExternalScripts.dll" DiskId="1" Source="$(var.Source)/modules/CheckExternalScripts.dll" Vital="no" /> 139 <File Id="ModCheckHelpers.dll" Name="CheckHelpers.dll" DiskId="1" Source="$(var.Source)/modules/CheckHelpers.dll" Vital="no" /> 140 <File Id="ModCheckSystem.dll" Name="CheckSystem.dll" DiskId="1" Source="$(var.Source)/modules/CheckSystem.dll" Vital="no" /> 141 <File Id="ModCheckWMI.dll" Name="CheckWMI.dll" DiskId="1" Source="$(var.Source)/modules/CheckWMI.dll" Vital="no" /> 142 <File Id="ModFileLogger.dll" Name="FileLogger.dll" DiskId="1" Source="$(var.Source)/modules/FileLogger.dll" Vital="no" /> 143 <File Id="ModLUAScript.dll" Name="LUAScript.dll" DiskId="1" Source="$(var.Source)/modules/LUAScript.dll" Vital="no" /> 144 <File Id="ModCheckNSCP.dll" Name="CheckNSCP.dll" DiskId="1" Source="$(var.Source)/modules/CheckNSCP.dll" Vital="no" /> 145 <File Id="ModCheckDisk.dll" Name="CheckDisk.dll" DiskId="1" Source="$(var.Source)/modules/CheckDisk.dll" Vital="no" /> 146 <File Id="ModCheckTaskSched.dll" Name="CheckTaskSched.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched.dll" Vital="no" /> 147 <File Id="ModCheckTaskSched2.dll" Name="CheckTaskSched2.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched2.dll" Vital="no" /> 148 </Component> 149 </Directory> 150 <Directory Id="INSTALLLOCATION_SCRIPTS" Name="scripts"> 151 <Component Id="Scripts" Guid="6439B928-2014-4efa-BA17-121D5DE0D527" Win64="$(var.Win64)"> 152 <File Id="script001" Name="check_60s.bat" DiskId="1" Source="$(var.Source)/scripts/check_60s.bat" Vital="no" /> 153 <File Id="script002" Name="check_battery.vbs" DiskId="1" Source="$(var.Source)/scripts/check_battery.vbs" Vital="no" /> 154 <File Id="script003" Name="check_files.vbs" DiskId="1" Source="$(var.Source)/scripts/check_files.vbs" Vital="no" /> 155 <File Id="script004" Name="check_no_rdp.bat" DiskId="1" Source="$(var.Source)/scripts/check_no_rdp.bat" Vital="no" /> 156 <File Id="script005" Name="check_printer.vbs" DiskId="1" Source="$(var.Source)/scripts/check_printer.vbs" Vital="no" /> 157 <File Id="script006" Name="check_ok.bat" DiskId="1" Source="$(var.Source)/scripts/check_ok.bat" Vital="no" /> 158 <File Id="script007" Name="check_ping.bat" DiskId="1" Source="$(var.Source)/scripts/check_ping.bat" Vital="no" /> 159 <File Id="script008" Name="check_updates.vbs" DiskId="1" Source="$(var.Source)/scripts/check_updates.vbs" Vital="no" /> 160 <File Id="sample001" Name="check_test.ps1" DiskId="1" Source="$(var.Source)/scripts/check_test.ps1" Vital="no" /> 161 <File Id="sample002" Name="check_test.vbs" DiskId="1" Source="$(var.Source)/scripts/check_test.vbs" Vital="no" /> 162 </Component> 163 <Directory Id="LUA_SCRIPTS" Name="lib"> 164 <Component Id="LuaScripts" Guid="BD341200-6F01-4bf3-ADEA-CE592229A8E5" Win64="$(var.Win64)"> 165 <File Id="lua001" Name="test.lua" DiskId="1" Source="$(var.Source)/scripts/lua/test.lua" Vital="no" /> 184 166 </Component> 185 167 </Directory> 186 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON" Name="python"> 187 <Component Id="PythonScripts" Guid="8820A304-C697-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 188 <File Id="P_script_001" Name="test_eventlog.py" DiskId="1" Source="$(var.Source)/scripts/python/test_eventlog.py" Vital="no" /> 189 <File Id="P_script_002" Name="test_nsca.py" DiskId="1" Source="$(var.Source)/scripts/python/test_nsca.py" Vital="no" /> 190 <File Id="P_script_003" Name="test_pb.py" DiskId="1" Source="$(var.Source)/scripts/python/test_pb.py" Vital="no" /> 191 <File Id="P_script_004" Name="test_sample.py" DiskId="1" Source="$(var.Source)/scripts/python/test_sample.py" Vital="no" /> 192 </Component> 193 </Directory> 194 195 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB1" Name="lib"> 196 <Component Id="PythonScriptsPBLib1" Guid="555165B3-5CBF-4204-A349-6AD7CCEF14EB" Win64="$(var.Win64)"> 197 <File Id="p_script_lib_001" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/__init__.py" Vital="no" /> 198 <File Id="p_script_pb_001" Name="ipc_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/ipc_pb2.py" Vital="no" /> 199 <File Id="p_script_pb_002" Name="plugin_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/plugin_pb2.py" Vital="no" /> 200 </Component> 201 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB2" Name="google"> 202 <Component Id="PythonScriptsPBLib2" Guid="555165B3-5CBF-4204-A349-6AD7CCEF14E1" Win64="$(var.Win64)"> 203 <File Id="p_script_lib_002" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/__init__.py" Vital="no" /> 204 </Component> 205 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB3" Name="protobuf"> 206 <Component Id="PythonScriptsPBLib3" Guid="555165B3-5CBF-4204-A349-6AD7CCEF14E2" Win64="$(var.Win64)"> 207 <File Id="p_script_lib_003" Name="descriptor.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/descriptor.py" Vital="no" /> 208 <File Id="p_script_lib_004" Name="descriptor_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/descriptor_pb2.py" Vital="no" /> 209 <File Id="p_script_lib_005" Name="message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/message.py" Vital="no" /> 210 <File Id="p_script_lib_006" Name="reflection.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/reflection.py" Vital="no" /> 211 <File Id="p_script_lib_007" Name="service.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/service.py" Vital="no" /> 212 <File Id="p_script_lib_008" Name="service_reflection.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/service_reflection.py" Vital="no" /> 213 <File Id="p_script_lib_009" Name="text_format.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/text_format.py" Vital="no" /> 214 <File Id="p_script_lib_010" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/__init__.py" Vital="no" /> 215 </Component> 216 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB4" Name="compiler"> 217 <Component Id="PythonScriptsPBLib4" Guid="555165B3-5CBF-4204-A349-6AD7CCEF14E3" Win64="$(var.Win64)"> 218 <File Id="p_script_lib_011" Name="plugin_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/compiler/plugin_pb2.py" Vital="no" /> 219 </Component> 220 </Directory> 221 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB5" Name="internal"> 222 <Component Id="PythonScriptsPBLib5" Guid="555165B3-5CBF-4204-A349-6AD7CCEF14E4" Win64="$(var.Win64)"> 223 <File Id="p_script_lib_012" Name="api_implementation.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/api_implementation.py" Vital="no" /> 224 <File Id="p_script_lib_013" Name="containers.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/containers.py" Vital="no" /> 225 <File Id="p_script_lib_014" Name="cpp_message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/cpp_message.py" Vital="no" /> 226 <File Id="p_script_lib_015" Name="decoder.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/decoder.py" Vital="no" /> 227 <File Id="p_script_lib_016" Name="encoder.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/encoder.py" Vital="no" /> 228 <File Id="p_script_lib_017" Name="message_listener.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/message_listener.py" Vital="no" /> 229 <File Id="p_script_lib_018" Name="python_message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/python_message.py" Vital="no" /> 230 <File Id="p_script_lib_019" Name="type_checkers.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/type_checkers.py" Vital="no" /> 231 <File Id="p_script_lib_020" Name="wire_format.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/wire_format.py" Vital="no" /> 232 <File Id="p_script_lib_021" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/__init__.py" Vital="no" /> 233 </Component> 234 </Directory> 235 </Directory> 236 </Directory> 237 </Directory> 238 </Directory> 239 </Directory> 240 </Directory> 168 <Directory Id="INSTALLLOCATION_SCRIPTS_LIB" Name="lib"> 169 <Component Id="ScriptLibs" Guid="E4B49908-F625-49af-A936-E2E8B079B031" Win64="$(var.Win64)"> 170 <File Id="lib001" Name="NagiosPlugins.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/NagiosPlugins.vbs" Vital="no" /> 171 <File Id="lib002" Name="wrapper.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/wrapper.vbs" Vital="no" /> 172 </Component> 173 </Directory> 174 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON" Name="python"> 175 <Component Id="PythonScripts" Guid="5FE52128-E22D-4ab3-8A58-49289329F99C" Win64="$(var.Win64)"> 176 <File Id="P_script_001" Name="test_eventlog.py" DiskId="1" Source="$(var.Source)/scripts/python/test_eventlog.py" Vital="no" /> 177 <File Id="P_script_002" Name="test_nsca.py" DiskId="1" Source="$(var.Source)/scripts/python/test_nsca.py" Vital="no" /> 178 <File Id="P_script_003" Name="test_pb.py" DiskId="1" Source="$(var.Source)/scripts/python/test_pb.py" Vital="no" /> 179 <File Id="P_script_004" Name="test_sample.py" DiskId="1" Source="$(var.Source)/scripts/python/test_sample.py" Vital="no" /> 180 </Component> 181 </Directory> 182 183 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB1" Name="lib"> 184 <Component Id="PythonScriptsPBLib1" Guid="7BB3FE48-7E17-4796-9135-76A26DB3B81E" Win64="$(var.Win64)"> 185 <File Id="p_script_lib_001" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/__init__.py" Vital="no" /> 186 <File Id="p_script_pb_001" Name="ipc_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/ipc_pb2.py" Vital="no" /> 187 <File Id="p_script_pb_002" Name="plugin_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/plugin_pb2.py" Vital="no" /> 188 </Component> 189 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB2" Name="google"> 190 <Component Id="PythonScriptsPBLib2" Guid="06098D2E-727B-42fe-93A0-364E50D48EFC" Win64="$(var.Win64)"> 191 <File Id="p_script_lib_002" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/__init__.py" Vital="no" /> 192 </Component> 193 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB3" Name="protobuf"> 194 <Component Id="PythonScriptsPBLib3" Guid="F683848B-9ECD-4d8a-932B-0E79574186D6" Win64="$(var.Win64)"> 195 <File Id="p_script_lib_003" Name="descriptor.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/descriptor.py" Vital="no" /> 196 <File Id="p_script_lib_004" Name="descriptor_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/descriptor_pb2.py" Vital="no" /> 197 <File Id="p_script_lib_005" Name="message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/message.py" Vital="no" /> 198 <File Id="p_script_lib_006" Name="reflection.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/reflection.py" Vital="no" /> 199 <File Id="p_script_lib_007" Name="service.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/service.py" Vital="no" /> 200 <File Id="p_script_lib_008" Name="service_reflection.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/service_reflection.py" Vital="no" /> 201 <File Id="p_script_lib_009" Name="text_format.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/text_format.py" Vital="no" /> 202 <File Id="p_script_lib_010" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/__init__.py" Vital="no" /> 203 </Component> 204 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB4" Name="compiler"> 205 <Component Id="PythonScriptsPBLib4" Guid="A1943D51-39AE-4eac-91D5-D066C22EF5CB" Win64="$(var.Win64)"> 206 <File Id="p_script_lib_011" Name="plugin_pb2.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/compiler/plugin_pb2.py" Vital="no" /> 207 </Component> 208 </Directory> 209 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON_LIB5" Name="internal"> 210 <Component Id="PythonScriptsPBLib5" Guid="64FCF330-B17F-434e-9CC4-F357C2126690" Win64="$(var.Win64)"> 211 <File Id="p_script_lib_012" Name="api_implementation.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/api_implementation.py" Vital="no" /> 212 <File Id="p_script_lib_013" Name="containers.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/containers.py" Vital="no" /> 213 <File Id="p_script_lib_014" Name="cpp_message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/cpp_message.py" Vital="no" /> 214 <File Id="p_script_lib_015" Name="decoder.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/decoder.py" Vital="no" /> 215 <File Id="p_script_lib_016" Name="encoder.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/encoder.py" Vital="no" /> 216 <File Id="p_script_lib_017" Name="message_listener.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/message_listener.py" Vital="no" /> 217 <File Id="p_script_lib_018" Name="python_message.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/python_message.py" Vital="no" /> 218 <File Id="p_script_lib_019" Name="type_checkers.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/type_checkers.py" Vital="no" /> 219 <File Id="p_script_lib_020" Name="wire_format.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/wire_format.py" Vital="no" /> 220 <File Id="p_script_lib_021" Name="__init__.py" DiskId="1" Source="$(var.Source)/scripts/python/lib/google/protobuf/internal/__init__.py" Vital="no" /> 221 </Component> 222 </Directory> 223 </Directory> 224 </Directory> 225 </Directory> 226 </Directory> 227 </Directory> 228 </Directory> 241 229 242 230 <!-- ### Start Menu Items ### --> … … 251 239 <Feature Id="MainProgram" Title="Program" Description="Main Service" Level="1" Absent="disallow"> 252 240 <ComponentRef Id="MainClient" /> 253 <ComponentRef Id="Shortcuts" />254 241 <ComponentRef Id="Helpers" /> 255 <ComponentRef Id="RandomFiles" /> 256 <ComponentRef Id="SampleConfigUser" /> 257 <ComponentRef Id="SampleConfig" /> 258 </Feature> 242 <ComponentRef Id="RandomFiles" /> 243 <ComponentRef Id="SampleConfigUser" /> 244 <ComponentRef Id="SampleConfig" /> 245 <Feature Id="Shortcuts" Title="Shortcuts" Description="Main Service" Level="1" Absent="disallow"> 246 <ComponentRef Id="Shortcuts" /> 247 </Feature> 248 </Feature> 259 249 <Feature Id="Documentation" Title="Documentation (pdf)" Description="Documentation for NSClient++ and how to use it from Nagios" Level="1"> 260 250 <ComponentRef Id="NagiosDocumentation" /> … … 263 253 <Feature Id="Plugins" Title="Plugins" Description="Plugins" Level="1" Absent="disallow"> 264 254 <Feature Id="CheckPlugins" Title="Check Plugins" Description="Various plugins to check your system. (Includes all check plugins)" Level="1"> 265 <ComponentRef Id="Plugins" /> 266 </Feature> 255 <ComponentRef Id="Plugins" /> 256 <ComponentRef Id="LuaScripts" /> 257 </Feature> 267 258 <Feature Id="NRPEPlugins" Title="NRPE Support" Description="NRPE Server Plugin. Support for the more vercitile NRPE protocol (check_nrpe)" Level="1" Absent="disallow"> 268 259 <ComponentRef Id="NRPEServer" /> … … 272 263 <ComponentRef Id="NSCServer" /> 273 264 </Feature> 274 <Feature Id="NSCAPlugin" Title="NSCA plugin" Description="Plugin to submit passive results to an NSCA server" Level="1" Absent="disallow">275 <ComponentRef Id="NSCA" />276 </Feature>277 <Feature Id="ExtraClientPlugin" Title="Various client plugins" Description="Plugins to connect to various sytems such as syslog, graphite and smtp" Level="1" Absent="disallow">278 <ComponentRef Id="ExtraClients" />279 </Feature>280 <Feature Id="NSCPPlugin" Title="NSCP plugin (experimental)" Description="Plugin to submit passive results to an NSCP server" Level="1" Absent="disallow">281 <ComponentRef Id="NSCP" />282 </Feature>283 <Feature Id="PythonScript" Title="Python Scripting" Description="Python scripting requires python to be installed)" Level="1" Absent="disallow">284 <ComponentRef Id="PythonScript" />285 <ComponentRef Id="PythonScripts" />286 <Feature Id="PythonScriptPBLib" Title="Protocl buffer lib" Description="Python library for protocol buffers" Level="1" Absent="disallow">287 <ComponentRef Id="PythonScriptsPBLib1" />288 <ComponentRef Id="PythonScriptsPBLib2" />289 <ComponentRef Id="PythonScriptsPBLib3" />290 <ComponentRef Id="PythonScriptsPBLib4" />291 <ComponentRef Id="PythonScriptsPBLib5" />292 </Feature>293 </Feature>294 <Feature Id="SampleScripts" Title="Sample Scripts" Description="Some sample client-side scripts to use with NRPE" Level="1" Absent="disallow">265 <Feature Id="NSCAPlugin" Title="NSCA plugin" Description="Plugin to submit passive results to an NSCA server" Level="1" Absent="disallow"> 266 <ComponentRef Id="NSCA" /> 267 </Feature> 268 <Feature Id="ExtraClientPlugin" Title="Various client plugins" Description="Plugins to connect to various sytems such as syslog, graphite and smtp" Level="1" Absent="disallow"> 269 <ComponentRef Id="ExtraClients" /> 270 </Feature> 271 <Feature Id="NSCPPlugin" Title="NSCP plugin (experimental)" Description="Plugin to submit passive results to an NSCP server" Level="1" Absent="disallow"> 272 <ComponentRef Id="NSCP" /> 273 </Feature> 274 <Feature Id="PythonScript" Title="Python Scripting" Description="Python scripting requires python to be installed)" Level="1" Absent="disallow"> 275 <ComponentRef Id="PythonScript" /> 276 <ComponentRef Id="PythonScripts" /> 277 <Feature Id="PythonScriptPBLib" Title="Protocl buffer lib" Description="Python library for protocol buffers" Level="1" Absent="disallow"> 278 <ComponentRef Id="PythonScriptsPBLib1" /> 279 <ComponentRef Id="PythonScriptsPBLib2" /> 280 <ComponentRef Id="PythonScriptsPBLib3" /> 281 <ComponentRef Id="PythonScriptsPBLib4" /> 282 <ComponentRef Id="PythonScriptsPBLib5" /> 283 </Feature> 284 </Feature> 285 <Feature Id="SampleScripts" Title="Sample Scripts" Description="Some sample client-side scripts to use with NRPE" Level="1" Absent="disallow"> 295 286 <ComponentRef Id="Scripts" /> 296 287 <ComponentRef Id="ScriptLibs" /> … … 307 298 308 299 309 <CustomAction Id="GenConfig.Command" Property="GenConfig" Value=""[#NSClientEXE]" settings --generate ini"/>310 <CustomAction Id="GenConfig" BinaryKey="WixCA" DllEntry="CAQuietExec" Impersonate="no" Return="ignore" Execute="deferred"/>311 312 <CustomAction Id="SetUserGroupUsers" Property="TRANSLATE_SID" Value="S-1-5-32-545" Return="check" />313 <CustomAction Id="SetUserGroupUsersProp" Property="TRANSLATE_SID_PROPERTY" Value="USERGROUP_USERS" Return="check" />314 <CustomAction Id="TranslateUserGroupUsers" BinaryKey="InstallerHelper" DllEntry="TranslateSid"/>315 316 <Binary Id='InstallerHelper' SourceFile='$(var.Helpers)/main_dll.dll' />317 318 <InstallExecuteSequence>300 <CustomAction Id="GenConfig.Command" Property="GenConfig" Value=""[#NSClientEXE]" settings --generate ini"/> 301 <CustomAction Id="GenConfig" BinaryKey="WixCA" DllEntry="CAQuietExec" Impersonate="no" Return="ignore" Execute="deferred"/> 302 303 <CustomAction Id="SetUserGroupUsers" Property="TRANSLATE_SID" Value="S-1-5-32-545" Return="check" /> 304 <CustomAction Id="SetUserGroupUsersProp" Property="TRANSLATE_SID_PROPERTY" Value="USERGROUP_USERS" Return="check" /> 305 <CustomAction Id="TranslateUserGroupUsers" BinaryKey="InstallerHelper" DllEntry="TranslateSid"/> 306 307 <Binary Id='InstallerHelper' SourceFile='$(var.Helpers)/main_dll.dll' /> 308 309 <InstallExecuteSequence> 319 310 <RemoveExistingProducts After='InstallInitialize'/> 320 311 <Custom Action="PreventDowngrading" After="FindRelatedProducts">NEWAPPFOUND</Custom> 321 <Custom Action="ScheduleWriteConfig" After="InstallFiles">NOT REMOVE</Custom>322 <Custom Action="GenConfig.Command" After="ScheduleWriteConfig">NOT REMOVE AND INSTALL_SAMPLE_CONFIG = 1</Custom>323 <Custom Action="GenConfig" After="GenConfig.Command">NOT REMOVE AND INSTALL_SAMPLE_CONFIG = 1</Custom>324 325 <Custom Action="SetUserGroupUsers" After="LaunchConditions">NOT Installed</Custom>326 <Custom Action="SetUserGroupUsersProp" After="SetUserGroupUsers">NOT Installed</Custom>327 <Custom Action="TranslateUserGroupUsers" After="SetUserGroupUsersProp">NOT Installed</Custom>328 329 </InstallExecuteSequence>312 <Custom Action="ScheduleWriteConfig" After="InstallFiles">NOT REMOVE</Custom> 313 <Custom Action="GenConfig.Command" After="ScheduleWriteConfig">NOT REMOVE AND INSTALL_SAMPLE_CONFIG = 1 AND GENERATE_SAMPLE_CONFIG = 1</Custom> 314 <Custom Action="GenConfig" After="GenConfig.Command">NOT REMOVE AND INSTALL_SAMPLE_CONFIG = 1 AND GENERATE_SAMPLE_CONFIG = 1</Custom> 315 316 <Custom Action="SetUserGroupUsers" After="LaunchConditions">NOT Installed</Custom> 317 <Custom Action="SetUserGroupUsersProp" After="SetUserGroupUsers">NOT Installed</Custom> 318 <Custom Action="TranslateUserGroupUsers" After="SetUserGroupUsersProp">NOT Installed</Custom> 319 320 </InstallExecuteSequence> 330 321 331 322 <InstallUISequence> … … 347 338 <Icon Id="nscp.exe" SourceFile="$(var.Source)/nscp.exe" /> 348 339 <Icon Id="doc.ico" SourceFile="../../../resources/help.ico"/> 349 <Binary Id="OldSettingsMap" SourceFile="$(var.Source)/old-settings.map" />340 <Binary Id="OldSettingsMap" SourceFile="$(var.Source)/old-settings.map" /> 350 341 </Product> 351 342 </Wix> -
helpers/installers/installer/properties.wxs
rc88cf98 r83c2453 33 33 --> 34 34 <Property Id="CONFIGURATION_TYPE">ini://${exe-path}/nsclient.ini</Property> 35 <Property Id="INSTALL_SAMPLE_CONFIG">1</Property> 35 <Property Id="GENERATE_SAMPLE_CONFIG">1</Property> 36 <Property Id="INSTALL_SAMPLE_CONFIG">1</Property> 36 37 37 <!-- CONFIGURE THE INSTALLER -->38 <Property Id="ALLOW_CONFIGURATION">1</Property>39 <Property Id="MAIN_CONFIGURATION_FILE">nsclient.ini</Property>40 <Property Id="CUSTOM_CONFIGURATION_FILE">nsclient.ini</Property>41 <WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" />42 <WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" />38 <!-- CONFIGURE THE INSTALLER --> 39 <Property Id="ALLOW_CONFIGURATION">1</Property> 40 <Property Id="MAIN_CONFIGURATION_FILE">nsclient.ini</Property> 41 <Property Id="CUSTOM_CONFIGURATION_FILE">nsclient.ini</Property> 42 <WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" /> 43 <WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" /> 43 44 44 <!-- CONFIGURE THE PROGRAM -->45 <!-- CONFIGURE THE PROGRAM --> 45 46 <Property Id="HELP_LINK">http://nsclient.org/nscp/</Property> 46 47 <Property Id="SERVICE_NAME">nscp</Property> -
include/execute_process_w32.hpp
r523576e r83c2453 121 121 result = NSCAPI::returnUNKNOWN; 122 122 } else { 123 std::wstring::size_type pos = msg.find_last_not_of(_T("\n\r ")); 124 if (pos != std::wstring::npos) { 125 if (pos == msg.size()) 126 msg = msg.substr(0,pos); 127 else 128 msg = msg.substr(0,pos+1); 129 } 123 130 if (msg.empty()) { 124 131 msg = _T("No output available from command (") + args.command + _T(")."); … … 126 133 strEx::token t = strEx::getToken(msg, '|'); 127 134 msg = t.first; 128 std::wstring::size_type pos = msg.find_last_not_of(_T("\n\r "));129 if (pos != std::wstring::npos) {130 if (pos == msg.size())131 msg = msg.substr(0,pos);132 else133 msg = msg.substr(0,pos+1);134 }135 135 perf = t.second; 136 136 } -
include/nscapi/nscapi_protobuf_functions.cpp
r84cdb9b r83c2453 436 436 message.SerializeToString(&request); 437 437 } 438 void functions::parse_simple_exec_result(const std::string &response, std::list<std::wstring> &result) { 438 int functions::parse_simple_exec_result(const std::string &response, std::list<std::wstring> &result) { 439 int ret = 0; 439 440 Plugin::ExecuteResponseMessage message; 440 441 message.ParseFromString(response); … … 442 443 for (int i=0;i<message.payload_size(); i++) { 443 444 result.push_back(utf8::cvt<std::wstring>(message.payload(i).message())); 444 } 445 int r=gbp_to_nagios_status(message.payload(i).result()); 446 if (r > ret) 447 ret = r; 448 } 449 return ret; 445 450 } 446 451 void functions::parse_simple_exec_result(const std::string &response, std::wstring &result) { … … 530 535 } 531 536 532 Plugin::Common::PerformanceData* perfData = payload->add_perf();533 perfData->set_type(Plugin::Common_DataType_FLOAT);534 537 std::pair<T,T> fitem = strEx::split(items[0], tokenizer_data.perf_equal_sign); 535 538 T alias = fitem.first; … … 537 540 alias = alias.substr(1, alias.size()-2); 538 541 542 if (alias.empty()) 543 continue; 544 Plugin::Common::PerformanceData* perfData = payload->add_perf(); 545 perfData->set_type(Plugin::Common_DataType_FLOAT); 539 546 perfData->set_alias(utf8::cvt<std::string>(alias)); 540 547 Plugin::Common_PerformanceData_FloatValue* floatPerfData = perfData->mutable_float_value(); 541 548 549 typename T::size_type pstart = fitem.second.find_first_of(tokenizer_data.perf_valid_number); 550 if (pstart == T::npos) { 551 floatPerfData->set_value(0); 552 continue; 553 } 554 if (pstart != 0) 555 fitem.second = fitem.second.substr(pstart); 542 556 typename T::size_type pend = fitem.second.find_first_not_of(tokenizer_data.perf_valid_number); 543 557 if (pend == T::npos) { -
include/nscapi/nscapi_protobuf_functions.hpp
r84cdb9b r83c2453 145 145 static void create_simple_exec_request(const std::wstring &command, const std::list<std::wstring> & args, std::string &request); 146 146 static void create_simple_exec_request(const std::wstring &command, const std::vector<std::wstring> & args, std::string &request); 147 static voidparse_simple_exec_result(const std::string &response, std::list<std::wstring> &result);147 static int parse_simple_exec_result(const std::string &response, std::list<std::wstring> &result); 148 148 static void parse_simple_exec_result(const std::string &response, std::wstring &result); 149 149 -
include/nscapi/nscapi_targets.hpp
r84cdb9b r83c2453 119 119 object_type::options_type options; 120 120 settings.path(object.path).add_path() 121 ( object.alias,nscapi::settings_helper::wstring_map_path(&options),121 (nscapi::settings_helper::wstring_map_path(&options), 122 122 _T("TARGET DEFENITION"), _T("Target definition for: ") + object.alias) 123 123 … … 130 130 131 131 (_T("host"), sh::string_fun_key<std::wstring>(boost::bind(&object_type::set_host, &object, _1)), 132 _T("TARGET HOST"), _T("The target server to report results to.") )132 _T("TARGET HOST"), _T("The target server to report results to."), true) 133 133 134 134 (_T("port"), sh::int_fun_key<int>(boost::bind(&object_type::set_port, &object, _1)), 135 _T("TARGET PORT"), _T("The target server port") )135 _T("TARGET PORT"), _T("The target server port"), true) 136 136 137 137 (_T("alias"), nscapi::settings_helper::wstring_key(&object.alias, object.alias), 138 _T("TARGET ALIAS"), _T("The alias for the target") )138 _T("TARGET ALIAS"), _T("The alias for the target"), true) 139 139 140 140 (_T("parent"), nscapi::settings_helper::wstring_key(&object.parent, _T("default")), 141 _T("TARGET PARENT"), _T("The parent the target inherits from") )141 _T("TARGET PARENT"), _T("The parent the target inherits from"), true) 142 142 143 143 (_T("is template"), nscapi::settings_helper::bool_key(&object.is_template, false), 144 _T("IS TEMPLATE"), _T("Declare this object as a template (this means it will not be avalible as a separate object)") )144 _T("IS TEMPLATE"), _T("Declare this object as a template (this means it will not be avalible as a separate object)"), true) 145 145 146 146 ; -
include/settings/client/settings_client.hpp
r76540c3 r83c2453 493 493 settings_keys_easy_init(std::wstring path, std::wstring parent, settings_registry* owner_) : owner(owner_), path_(path), parent_(parent) {} 494 494 495 settings_keys_easy_init& operator()(std::wstring path, std::wstring key_name, boost::shared_ptr<key_interface> value, std::wstring title, std::wstring description ) {496 boost::shared_ptr<key_info> d(new key_info(path, key_name, value, description_container(title, description )));495 settings_keys_easy_init& operator()(std::wstring path, std::wstring key_name, boost::shared_ptr<key_interface> value, std::wstring title, std::wstring description, bool advanced = false) { 496 boost::shared_ptr<key_info> d(new key_info(path, key_name, value, description_container(title, description, advanced))); 497 497 if (!parent_.empty()) 498 498 d->set_parent(parent_); … … 501 501 } 502 502 503 settings_keys_easy_init& operator()(std::wstring key_name, boost::shared_ptr<key_interface> value, std::wstring title, std::wstring description ) {504 boost::shared_ptr<key_info> d(new key_info(path_, key_name, value, description_container(title, description )));503 settings_keys_easy_init& operator()(std::wstring key_name, boost::shared_ptr<key_interface> value, std::wstring title, std::wstring description, bool advanced = false) { 504 boost::shared_ptr<key_info> d(new key_info(path_, key_name, value, description_container(title, description, advanced))); 505 505 if (!parent_.empty()) 506 506 d->set_parent(parent_); -
include/settings/settings_handler_impl.hpp
rfb7e36a r83c2453 135 135 /// @author mickem 136 136 void update_defaults() { 137 get_logger()->warn(__FILE__, __LINE__, _T("Updating settings with default values!"));138 137 BOOST_FOREACH(std::wstring path, get_reg_sections()) { 139 138 get()->add_path(path); … … 146 145 get()->set_string(path, key, desc.defValue); 147 146 else if (desc.type == key_bool) 148 get()->set_bool(path, key, desc.defValue==_T("true"));147 get()->set_bool(path, key, settings::settings_interface::string_to_bool(desc.defValue)); 149 148 else if (desc.type == key_integer) 150 149 get()->set_int(path, key, strEx::stoi(desc.defValue)); … … 157 156 get()->set_string(path, key, val); 158 157 else if (desc.type == key_bool) 159 get()->set_bool(path, key, val==_T("true"));158 get()->set_bool(path, key, settings::settings_interface::string_to_bool(val)); 160 159 else if (desc.type == key_integer) 161 160 get()->set_int(path, key, strEx::stoi(val)); -
include/strEx.h
r523576e r83c2453 261 261 return ss.str(); 262 262 } 263 inline std::string itos(double i) { 264 std::stringstream ss; 265 ss << i; 266 return ss.str(); 267 } 263 268 inline std::string itos(int i) { 264 269 std::stringstream ss; -
modules/CheckEventLog/CheckEventLog.cpp
r822454f r83c2453 151 151 if (alias.empty()) 152 152 alias = info.alias; 153 if (!nscapi::core_helper::submit_simple_message(info.target, alias, NSCAPI::return CRIT, info.ok_msg, info.perf_msg, response)) {153 if (!nscapi::core_helper::submit_simple_message(info.target, alias, NSCAPI::returnOK, info.ok_msg, info.perf_msg, response)) { 154 154 NSC_LOG_ERROR(_T("Failed to submit evenhtlog result: ") + response); 155 155 } … … 208 208 fargs->debug = debug_; 209 209 fargs->alias = filter.alias; 210 fargs->bShowDescriptions = true; 210 211 eventlog_filter::filter_engine engine = eventlog_filter::factories::create_engine(fargs); 211 212 -
modules/CheckExternalScripts/CheckExternalScripts.cpp
ree52cdd r83c2453 80 80 commands_path = settings.alias().get_settings_path(_T("scripts")); 81 81 aliases_path = settings.alias().get_settings_path(_T("alias")); 82 std::wstring wrappings_path = settings.alias().get_settings_path(_T("wrappings")); 82 83 83 84 settings.alias().add_path_to_settings() … … 92 93 settings.clear(); 93 94 95 NSC_DEBUG_MSG(_T("===> ") + strEx::itos(wrappings_.size())); 96 97 if (wrappings_.empty()) { 98 NSC_DEBUG_MSG(_T("No wrappings found (adding default: vbs, ps1 and bat)")); 99 wrappings_[_T("vbs")] = _T("cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%"); 100 wrappings_[_T("ps1")] = _T("cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -"); 101 wrappings_[_T("bat")] = _T("scripts\\%SCRIPT% %ARGS%"); 102 get_core()->settings_register_key(wrappings_path, _T("vbs"), NSCAPI::key_string, _T("VISUAL BASIC WRAPPING"), _T(""), wrappings_[_T("vbs")], false); 103 get_core()->settings_register_key(wrappings_path, _T("ps1"), NSCAPI::key_string, _T("POWERSHELL WRAPPING"), _T(""), wrappings_[_T("ps1")], false); 104 get_core()->settings_register_key(wrappings_path, _T("bat"), NSCAPI::key_string, _T("BATCH FILE WRAPPING"), _T(""), wrappings_[_T("bat")], false); 105 } 106 94 107 settings.alias().add_path_to_settings() 95 108 (_T("EXTERNAL SCRIPT SECTION"), _T("Section for external scripts configuration options (CheckExternalScripts).")) … … 122 135 settings.register_all(); 123 136 settings.notify(); 137 124 138 125 139 if (!scriptDirectory_.empty()) { -
modules/CheckExternalScripts/CheckExternalScripts.h
r523576e r83c2453 90 90 91 91 std::wstring tpl = wrappings_[type]; 92 if (tpl.empty() && type == _T("vbs"))93 tpl = _T("cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%");94 else if (tpl.empty() && type == _T("ps1"))95 tpl = _T("cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -");96 else if (tpl.empty() && type == _T("bat"))97 tpl = _T("scripts\\%SCRIPT% %ARGS%");98 92 if (tpl.empty()) { 99 93 NSC_LOG_ERROR(_T("Failed to find wrapping for type: ") + type); … … 101 95 strEx::replace(tpl, _T("%SCRIPT%"), tok.first); 102 96 strEx::replace(tpl, _T("%ARGS%"), tok.second); 103 104 97 add_command(key,tpl); 105 98 } -
modules/GraphiteClient/GraphiteClient.cpp
r74e060a r83c2453 71 71 72 72 settings.alias().add_key_to_settings() 73 (_T("channel"), sh::wstring_key(&channel_, _T("NSCA")), 73 (_T("hostname"), sh::string_key(&hostname_, "auto"), 74 _T("HOSTNAME"), _T("The host name of this host if set to blank (default) the windows name of the computer will be used.")) 75 76 (_T("channel"), sh::wstring_key(&channel_, _T("GRAPHITE")), 74 77 _T("CHANNEL"), _T("The channel to listen to.")) 75 78 ; 76 79 77 settings.alias().add_path_to_settings(_T("server"))78 (_T("NSCA SERVER"), _T("Configure the NSCA server to report to."))79 ;80 81 80 settings.register_all(); 82 81 settings.notify(); … … 87 86 get_core()->registerSubmissionListener(get_id(), channel_); 88 87 89 register_command(_T("nsca_query"), _T("Check remote NRPE host")); 90 register_command(_T("nsca_submit"), _T("Submit (via query) remote NRPE host")); 91 register_command(_T("nsca_forward"), _T("Forward query to remote NRPE host")); 92 register_command(_T("nsca_exec"), _T("Execute (via query) remote NRPE host")); 93 register_command(_T("nsca_help"), _T("Help on using NRPE Client")); 88 register_command(command_prefix + _T("_query"), _T("QUery remote host")); 89 register_command(command_prefix + _T("_submit"), _T("Submit to remote host")); 90 register_command(command_prefix + _T("_forward"), _T("Forward query to remote host")); 91 register_command(command_prefix + _T("_exec"), _T("Execute command on remote host")); 92 register_command(command_prefix + _T("_help"), _T("Help")); 93 94 if (hostname_ == "auto") { 95 hostname_ = boost::asio::ip::host_name(); 96 } else { 97 std::pair<std::string,std::string> dn = strEx::split<std::string>(boost::asio::ip::host_name(), "."); 98 99 try { 100 boost::asio::io_service svc; 101 boost::asio::ip::tcp::resolver resolver (svc); 102 boost::asio::ip::tcp::resolver::query query (boost::asio::ip::host_name(), ""); 103 boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve (query), end; 104 105 std::string s; 106 while (iter != end) { 107 s += iter->host_name(); 108 s += " - "; 109 s += iter->endpoint().address().to_string(); 110 iter++; 111 } 112 } catch (const std::exception& e) { 113 NSC_LOG_ERROR_STD(_T("Failed to resolve: ") + utf8::to_unicode(e.what())); 114 } 115 116 117 strEx::replace(hostname_, "${host}", dn.first); 118 strEx::replace(hostname_, "${domain}", dn.second); 119 } 94 120 95 121 … … 190 216 void GraphiteClient::add_local_options(po::options_description &desc, client::configuration::data_type data) { 191 217 desc.add_options() 192 ("encryption,e", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->recipient, "encryption", _1)), 193 "Length of payload (has to be same as on the server)") 194 195 ("buffer-length,l", po::value<unsigned int>()->notifier(boost::bind(&nscapi::functions::destination_container::set_int_data, &data->recipient, "payload length", _1)), 196 "Length of payload (has to be same as on the server)") 218 ("path", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->recipient, "path", _1)), 219 "") 197 220 198 221 ("timeout", po::value<unsigned int>()->notifier(boost::bind(&nscapi::functions::destination_container::set_int_data, &data->recipient, "timeout", _1)), 199 222 "") 200 223 201 ("password", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->recipient, "password", _1)),202 "Password")203 204 ("time-offset", po::value<std::string>()->notifier(boost::bind(&nscapi::functions::destination_container::set_string_data, &data->recipient, "time offset", _1)),205 "")206 224 ; 207 225 } … … 243 261 244 262 int GraphiteClient::clp_handler_impl::query(client::configuration::data_type data, const Plugin::QueryRequestMessage &request_message, std::string &reply) { 245 const ::Plugin::Common_Header& request_header = request_message.header(); 246 connection_data con = parse_header(request_header, data); 247 248 Plugin::QueryResponseMessage response_message; 249 nscapi::functions::make_return_header(response_message.mutable_header(), request_header); 250 251 std::list<g_data> list; 252 for (int i=0;i < request_message.payload_size(); ++i) { 253 g_data d; 254 d.path = "aaa"; 255 d.value = "123"; 256 list.push_back(d); 257 } 258 259 boost::tuple<int,std::wstring> ret = instance->send(con, list); 260 261 nscapi::functions::append_simple_query_response_payload(response_message.add_payload(), "TODO", ret.get<0>(), utf8::cvt<std::string>(ret.get<1>()), ""); 262 response_message.SerializeToString(&reply); 263 return NSCAPI::isSuccess; 263 NSC_LOG_ERROR_STD(_T("GRAPHITE does not support query patterns")); 264 nscapi::functions::create_simple_query_response_unknown(_T("UNKNOWN"), _T("GRAPHITE does not support query patterns"), reply); 265 return NSCAPI::hasFailed; 264 266 } 265 267 … … 267 269 const ::Plugin::Common_Header& request_header = request_message.header(); 268 270 connection_data con = parse_header(request_header, data); 269 std::wstring channel = utf8::cvt<std::wstring>(request_message.channel()); 271 std::string path = con.path; 272 273 strEx::replace(path, "${hostname}", con.sender_hostname); 270 274 271 275 Plugin::SubmitResponseMessage response_message; … … 274 278 std::list<g_data> list; 275 279 for (int i=0;i < request_message.payload_size(); ++i) { 276 g_data d; 277 d.path = "aaa"; 278 d.value = "123"; 279 list.push_back(d); 280 Plugin::QueryResponseMessage::Response r =request_message.payload(i); 281 std::string tmp_path = path; 282 strEx::replace(tmp_path, "${check_alias}", r.alias()); 283 284 for (int j=0;j<r.perf_size();j++) { 285 g_data d; 286 ::Plugin::Common::PerformanceData perf = r.perf(j); 287 double value; 288 d.path = tmp_path; 289 strEx::replace(d.path, "${perf_alias}", perf.alias()); 290 if (perf.has_float_value()) { 291 if (perf.float_value().has_value()) 292 value = perf.float_value().value(); 293 else 294 NSC_LOG_ERROR(_T("Unsopported performance data (no value)")); 295 } else if (perf.has_int_value()) { 296 if (perf.int_value().has_value()) 297 value = perf.int_value().value(); 298 else 299 NSC_LOG_ERROR(_T("Unsopported performance data (no value)")); 300 } else { 301 NSC_LOG_ERROR(_T("Unsopported performance data type: ") + utf8::cvt<std::wstring>(perf.alias())); 302 continue; 303 } 304 strEx::replace(d.path, " ", "_"); 305 d.value = strEx::s::itos(value); 306 list.push_back(d); 307 } 280 308 } 281 309 … … 287 315 288 316 int GraphiteClient::clp_handler_impl::exec(client::configuration::data_type data, const Plugin::ExecuteRequestMessage &request_message, std::string &reply) { 289 const ::Plugin::Common_Header& request_header = request_message.header(); 290 connection_data con = parse_header(request_header, data); 291 292 Plugin::ExecuteResponseMessage response_message; 293 nscapi::functions::make_return_header(response_message.mutable_header(), request_header); 294 295 std::list<g_data> list; 296 for (int i=0;i < request_message.payload_size(); ++i) { 297 g_data d; 298 d.path = "aaa"; 299 d.value = "123"; 300 list.push_back(d); 301 } 302 boost::tuple<int,std::wstring> ret = instance->send(con, list); 303 nscapi::functions::append_simple_exec_response_payload(response_message.add_payload(), "TODO", ret.get<0>(), utf8::cvt<std::string>(ret.get<1>())); 304 response_message.SerializeToString(&reply); 305 return NSCAPI::isSuccess; 317 NSC_LOG_ERROR_STD(_T("GRAPHITE does not support exec patterns")); 318 nscapi::functions::create_simple_exec_response_unknown("UNKNOWN", "GRAPHITE does not support exec patterns", reply); 319 return NSCAPI::hasFailed; 306 320 } 307 321 -
modules/GraphiteClient/GraphiteClient.h
r74e060a r83c2453 55 55 static void init_default(target_object &target) { 56 56 target.set_property_int(_T("timeout"), 30); 57 target.set_property_string(_T("encryption"), _T("ase")); 58 target.set_property_int(_T("payload length"), 512); 57 target.set_property_string(_T("path"), _T("/nsclient++")); 59 58 } 60 59 … … 62 61 settings.path(object.path).add_key() 63 62 64 (_T(" timeout"), sh::int_fun_key<int>(boost::bind(&object_type::set_property_int, &object, _T("timeout"), _1), 30),65 _T(" TIMEOUT"), _T("Timeout when reading/writing packets to/from sockets."))63 (_T("path"), sh::string_fun_key<std::wstring>(boost::bind(&object_type::set_property_string, &object, _T("path"), _1), _T("system.${hostname}.${check_alias}.${perf_alias}")), 64 _T("PATH FOR VALUES"), _T("")) 66 65 67 (_T("payload length"), sh::int_fun_key<int>(boost::bind(&object_type::set_property_int, &object, _T("payload length"), _1), 512),68 _T("PAYLOAD LENGTH"), _T("Length of payload to/from the NRPE agent. This is a hard specific value so you have to \"configure\" (read recompile) your NRPE agent to use the same value for it to work."))69 70 (_T("encryption"), sh::string_fun_key<std::wstring>(boost::bind(&object_type::set_property_string, &object, _T("encryption"), _1), _T("aes")),71 _T("ENCRYPTION METHOD"), _T("Number corresponding to the various encryption algorithms (see the wiki). Has to be the same as the server or it wont work at all."))72 73 (_T("password"), sh::string_fun_key<std::wstring>(boost::bind(&object_type::set_property_string, &object, _T("password"), _1), _T("")),74 _T("PASSWORD"), _T("The password to use. Again has to be the same as the server or it wont work at all."))75 76 (_T("time offset"), sh::string_fun_key<std::wstring>(boost::bind(&object_type::set_property_string, &object, _T("delay"), _1), _T("0")),77 _T("TIME OFFSET"), _T("Time offset."))78 66 ; 79 67 } … … 86 74 87 75 struct connection_data { 88 std::string password; 89 std::string encryption; 90 std::string host, port; 91 std::string sender_hostname; 76 std::string path; 77 std::string host, port, sender_hostname; 92 78 int timeout; 93 int buffer_length;94 int time_delta;95 79 96 80 connection_data(nscapi::protobuf::types::destination_container recipient, nscapi::protobuf::types::destination_container target, nscapi::protobuf::types::destination_container sender) { 97 81 recipient.import(target); 98 82 timeout = recipient.get_int_data("timeout", 30); 99 buffer_length = recipient.get_int_data("payload length", 512); 100 password = recipient.get_string_data("password"); 101 encryption = recipient.get_string_data("encryption"); 102 std::string tmp = recipient.get_string_data("time offset"); 103 if (!tmp.empty()) 104 time_delta = strEx::stol_as_time_sec(recipient.get_string_data("time offset")); 105 else 106 time_delta = 0; 83 path = recipient.get_string_data("path"); 107 84 host = recipient.address.get_host(); 108 port = strEx::s::itos(recipient.address.get_port( 5667));85 port = strEx::s::itos(recipient.address.get_port(2003)); 109 86 sender_hostname = sender.address.host; 110 87 if (sender.has_data("host")) 111 sender_hostname = sender.get_string_data("host");88 sender_hostname = sender.get_string_data("host"); 112 89 } 113 90 … … 117 94 ss << _T(", port: ") << utf8::cvt<std::wstring>(port); 118 95 ss << _T(", timeout: ") << timeout; 119 ss << _T(", buffer_length: ") << buffer_length; 120 ss << _T(", time_delta: ") << time_delta; 121 ss << _T(", password: ") << utf8::cvt<std::wstring>(password); 122 ss << _T(", encryption: ") << utf8::cvt<std::wstring>(encryption); 96 ss << _T(", path: ") << utf8::cvt<std::wstring>(path); 123 97 return ss.str(); 124 98 } -
modules/NRPEClient/NRPEClient.cpp
r84cdb9b r83c2453 205 205 std::wstring recipient = utf8::cvt<std::wstring>(config.data->recipient.id); 206 206 if (!targets.has_object(recipient)) { 207 NSC_ LOG_ERROR(_T("Target not found (using default): ") + recipient);207 NSC_DEBUG_MSG(_T("Target not found (using default): ") + recipient); 208 208 recipient = _T("default"); 209 209 } -
modules/NRPEServer/NRPEServer.cpp
r98113da r83c2453 40 40 41 41 bool NRPEListener::loadModuleEx(std::wstring alias, NSCAPI::moduleLoadMode mode) { 42 43 /*44 DEFINE_SETTING_S(ALLOWED_HOSTS, NRPE_SECTION_PROTOCOL, GENERIC_KEY_ALLOWED_HOSTS, "");45 DESCRIBE_SETTING(ALLOWED_HOSTS, "ALLOWED HOST ADDRESSES", "This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon. If you leave this blank the global version will be used instead.");46 47 DEFINE_SETTING_B(CACHE_ALLOWED, NRPE_SECTION_PROTOCOL, GENERIC_KEY_SOCK_CACHE_ALLOWED, false);48 DESCRIBE_SETTING_ADVANCED(CACHE_ALLOWED, "ALLOWED HOSTS CACHING", "Used to cache looked up hosts if you check dynamic/changing hosts set this to false.");49 */50 42 try { 51 43 … … 62 54 63 55 (_T("payload length"), sh::int_fun_key<unsigned int>(boost::bind(&nrpe::server::handler::set_payload_length, info_.request_handler, _1), 1024), 64 _T("PAYLOAD LENGTH"), _T("Length of payload to/from the NRPE agent. This is a hard specific value so you have to \"configure\" (read recompile) your NRPE agent to use the same value for it to work.") )56 _T("PAYLOAD LENGTH"), _T("Length of payload to/from the NRPE agent. This is a hard specific value so you have to \"configure\" (read recompile) your NRPE agent to use the same value for it to work."), true) 65 57 66 58 (_T("allow arguments"), sh::bool_fun_key<bool>(boost::bind(&nrpe::server::handler::set_allow_arguments, info_.request_handler, _1), false), … … 71 63 72 64 (_T("performance data"), sh::bool_fun_key<bool>(boost::bind(&nrpe::server::handler::set_perf_data, info_.request_handler, _1), true), 73 _T("PERFORMANCE DATA"), _T("Send performance data back to nagios (set this to 0 to remove all performance data).") )65 _T("PERFORMANCE DATA"), _T("Send performance data back to nagios (set this to 0 to remove all performance data)."), true) 74 66 75 67 ; … … 78 70 79 71 (_T("thread pool"), sh::uint_key(&info_.thread_pool_size, 10), 80 _T("THREAD POOL"), _T("") )72 _T("THREAD POOL"), _T(""), true) 81 73 82 74 (_T("bind to"), sh::string_key(&info_.address), 83 _T("BIND TO ADDRESS"), _T("Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses.") )75 _T("BIND TO ADDRESS"), _T("Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses."), true) 84 76 85 77 (_T("socket queue size"), sh::int_key(&info_.back_log, 0), 86 _T("LISTEN QUEUE"), _T("Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts.") )78 _T("LISTEN QUEUE"), _T("Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts."), true) 87 79 88 80 (_T("allowed hosts"), sh::string_fun_key<std::wstring>(boost::bind(&socket_helpers::allowed_hosts_manager::set_source, &info_.allowed_hosts, _1), _T("127.0.0.1")), … … 99 91 100 92 (_T("certificate"), sh::wpath_key(&info_.certificate, _T("${certificate-path}/nrpe_dh_512.pem")), 101 _T("SSL CERTIFICATE"), _T(" "))93 _T("SSL CERTIFICATE"), _T("Configure which SSL certificate to use (DH key)")) 102 94 103 95 ; -
scripts/CMakeLists.txt
r441a022 r83c2453 39 39 FOREACH(file ${scripts_LUA}) 40 40 get_filename_component(filename ${file} NAME) 41 #MESSAGE(STATUS " + l ib- ${filename}")42 copy_single_file("script lua" lua/${filename} lua/python)41 #MESSAGE(STATUS " + lua - ${filename}") 42 copy_single_file("script lua" lua/${filename} scripts/lua) 43 43 ENDFOREACH(file ${scripts_LUA}) -
service/NSClient++.cpp
r836e9cd r83c2453 269 269 cli_parser parser(&mainClient); 270 270 return parser.parse(argc, argv); 271 272 // int nRetCode = 0;273 // if ( (argc > 1) && ((*argv[1] == '-') || (*argv[1] == '/')) ) {274 // if (false) {275 // } else if ( wcscasecmp( _T("encrypt"), argv[1]+1 ) == 0 ) {276 // std::wstring password;277 // if (!settings_manager::init_settings()) {278 // std::wcout << _T("Could not find settings") << std::endl;;279 // return 1;280 // }281 // std::wcout << _T("Enter password to encrypt (has to be a single word): ");282 // std::wcin >> password;283 // std::wstring xor_pwd = Encrypt(password);284 // std::wcout << _T("obfuscated_password=") << xor_pwd << std::endl;285 // std::wstring outPasswd = Decrypt(xor_pwd);286 // if (password != outPasswd)287 // std::wcout << _T("ERROR: Password did not match: ") << outPasswd<< std::endl;288 // settings_manager::destroy_settings();289 // return 0;290 // } else if ( wcscasecmp( _T("about"), argv[1]+1 ) == 0 ) {291 // try {292 // unsigned int next_plugin_id = 0;293 // LOG_INFO_CORE(APPLICATION_NAME _T(" (C) Michael Medin - michael<at>medin<dot>name"));294 // LOG_INFO_CORE(_T("Version: ") CURRENT_SERVICE_VERSION);295 // LOG_INFO_CORE(_T("Architecture: ") SZARCH);296 //297 // boost::filesystem::wpath pluginPath = (boost::filesystem::wpath)mainClient.getBasePath() / _T("modules");298 // LOG_INFO_CORE_STD(_T("Looking at plugins in: ") + pluginPath.string());299 //300 // boost::filesystem::wdirectory_iterator end_itr; // default construction yields past-the-end301 // for ( boost::filesystem::wdirectory_iterator itr( pluginPath ); itr != end_itr; ++itr ) {302 // if ( !is_directory(itr->status()) ) {303 // std::wstring file= itr->leaf();304 // LOG_INFO_CORE_STD(_T("Found: ") + file);305 // if (is_module(pluginPath / file)) {306 // NSCPlugin *plugin = new NSCPlugin(next_plugin_id++, pluginPath / file, _T(""));307 // std::wstring name = _T("<unknown>");308 // std::wstring description = _T("<unknown>");309 // try {310 // plugin->load_dll();311 // name = plugin->getName();312 // description = plugin->getDescription();313 // } catch(NSPluginException& e) {314 // LOG_ERROR_CORE_STD(_T("Exception raised: ") + e.error_ + _T(" in module: ") + e.file_);315 // } catch (std::exception e) {316 // LOG_ERROR_CORE_STD(_T("exception loading plugin: ") + strEx::string_to_wstring(e.what()));317 // } catch (...) {318 // LOG_ERROR_CORE_STD(_T("Unknown exception loading plugin"));319 // }320 // LOG_INFO_CORE_STD(_T("* ") + name + _T(" (") + file + _T(")"));321 // std::list<std::wstring> list = strEx::splitEx(description, _T("\n"));322 // for (std::list<std::wstring>::const_iterator cit = list.begin(); cit != list.end(); ++cit) {323 // LOG_INFO_CORE_STD(_T(" ") + *cit);324 // }325 // }326 // }327 // }328 // LOG_INFO_CORE_STD(_T("Done listing plugins from: ") + pluginPath.string());329 // return true;330 // } catch (std::exception &e) {331 // LOG_ERROR_CORE_STD(_T("Exception: ") + to_wstring(e.what()));332 // } catch (...) {333 // LOG_ERROR_CORE_STD(_T("Unknown Exception: "));334 // }335 // return false;336 // } else if ( wcscasecmp( _T("d"), argv[1]+1 ) == 0 ) {337 // // Run command from command line (like NRPE) but with debug enabled338 // } else if ( wcscasecmp( _T("c"), argv[1]+1 ) == 0 ) {339 // // Run command from command line (like NRPE)340 // mainClient.enableDebug(false);341 // mainClient.initCore(true);342 // std::wstring command, args, msg, perf;343 // if (argc > 2)344 // command = argv[2];345 // for (int i=3;i<argc;i++) {346 // if (i!=3) args += _T(" ");347 // args += argv[i];348 // }349 // nRetCode = mainClient.inject(command, args, msg, perf);350 // std::wcout << msg << _T("|") << perf << std::endl;351 // mainClient.exitCore(true);352 // return nRetCode;353 // } else {354 // std::wcerr << _T("Usage: -version, -about, -install, -uninstall, -start, -stop, -encrypt -settings") << std::endl;355 // std::wcerr << _T("Usage: [-noboot] <ModuleName> <commnd> [arguments]") << std::endl;356 // return -1;357 // }358 // return nRetCode;359 // return nRetCode;360 271 } 361 272 … … 1237 1148 BOOST_FOREACH(std::string &r, responses) { 1238 1149 try { 1239 nscapi::functions::parse_simple_exec_result(r, resp);1150 ret = nscapi::functions::parse_simple_exec_result(r, resp); 1240 1151 } catch (std::exception &e) { 1241 1152 resp.push_back(_T("Failed to extract return message: ") + utf8::cvt<std::wstring>(e.what())); -
service/cli_parser.hpp
r29655a1 r83c2453 50 50 ("generate", po::value<std::wstring>(), "(re)Generate a commented settings store or similar KEY can be trac, settings or the target store.") 51 51 ("add-defaults", "Add all default (if missing) values.") 52 ("load-all", "Load all plugins (currently only used with generate).") 52 53 ("path", po::value<std::wstring>()->default_value(_T("")), "Path of key to work with.") 53 54 ("key", po::value<std::wstring>()->default_value(_T("")), "Key to work with.") … … 224 225 225 226 bool def = vm.count("add-defaults")==1; 227 bool load_all = vm.count("load-all")==1; 226 228 227 229 nsclient::settings_client client(core_); … … 233 235 client.set_update_defaults(def); 234 236 237 client.boot(); 238 int ret = -1; 239 235 240 if (vm.count("generate")) { 236 core_->set_settings_context(vm["generate"].as<std::wstring>()); 237 client.boot(); 238 int ret = client.generate(vm["generate"].as<std::wstring>()); 241 //core_->set_settings_context(vm["generate"].as<std::wstring>()); 242 int ret = client.generate(load_all, vm["generate"].as<std::wstring>()); 239 243 client.exit(); 240 244 return ret; 241 } 242 client.boot(); 243 244 245 int ret = -1; 246 247 if (vm.count("migrate-to")) { 245 } else if (vm.count("migrate-to")) { 248 246 ret = client.migrate_to(vm["migrate-to"].as<std::wstring>()); 249 } 250 if (vm.count("migrate-from")) { 247 } else if (vm.count("migrate-from")) { 251 248 ret = client.migrate_from(vm["migrate-from"].as<std::wstring>()); 252 } 253 if (vm.count("set")) { 249 } else if (vm.count("set")) { 254 250 ret = client.set(vm["path"].as<std::wstring>(), vm["key"].as<std::wstring>(), vm["set"].as<std::wstring>()); 255 } 256 if (vm.count("list")) { 251 } else if (vm.count("list")) { 257 252 ret = client.list(vm["path"].as<std::wstring>()); 258 } 259 if (vm.count("show")) { 253 } else if (vm.count("show")) { 260 254 ret = client.show(vm["path"].as<std::wstring>(), vm["key"].as<std::wstring>()); 261 } 262 if (vm.count("switch")) { 255 } else if (vm.count("switch")) { 263 256 client.switch_context(vm["switch"].as<std::wstring>()); 264 257 ret = 0; 265 } 266 if (vm.count("settings")) { 258 } else if (vm.count("settings")) { 267 259 client.set_current(vm["settings"].as<std::wstring>()); 268 260 ret = 0; 261 } else { 262 std::cout << all << std::endl; 263 return 1; 269 264 } 270 265 client.exit(); -
service/settings_client.hpp
r89838be r83c2453 90 90 91 91 92 int generate( std::wstring target) {92 int generate(bool load_all, std::wstring target) { 93 93 try { 94 core_->load_all_plugins(NSCAPI::dontStart); 95 settings_manager::get_core()->update_defaults(); 94 if (load_all) 95 core_->load_all_plugins(NSCAPI::dontStart); 96 //settings_manager::get_core()->update_defaults(); 96 97 if (target == _T("settings") || target.empty()) { 97 98 settings_manager::get_core()->get()->save(); … … 130 131 } 131 132 } else { 132 settings_manager::get_core()->update_defaults();133 //settings_manager::get_core()->update_defaults(); 133 134 settings_manager::get_core()->get()->save_to(target); 134 135 } -
version.hpp
r822454f r83c2453 1 1 #ifndef VERSION_HPP 2 2 #define VERSION_HPP 3 #define PRODUCTVER 0,4,0,1 474 #define STRPRODUCTVER "0,4,0,1 47"5 #define STRPRODUCTDATE "2012-03-2 0"3 #define PRODUCTVER 0,4,0,151 4 #define STRPRODUCTVER "0,4,0,151" 5 #define STRPRODUCTDATE "2012-03-26" 6 6 #endif // VERSION_HPP -
version.txt
r822454f r83c2453 1 1 version=0.4.0 2 build=1 473 date=2012-03-2 02 build=151 3 date=2012-03-26
Note: See TracChangeset
for help on using the changeset viewer.








