我安装了 Icinga2,包括 Director。我已经添加了一个模板、服务和一个 Windows,在主机上安装了一个代理,但是我必须缺少一些东西。
我不断得到
“远程 Icinga 实例 'xxx' 未连接到 'zzz'”
,尽管通信非常好(相同的子网,没有防火墙,通过端口 5665 上的 telnet 验证了通信)。
这是 WEB GUI 的屏幕截图:
我有大量 2k12 r2 服务器,我想每 30 天保存一次他们的事件日志存档。我一直在寻找一个集中的解决方案,可能是一个 GPO。但据我所知,只能使用组策略来按文件大小归档日志或将它们保留一段时间。有没有办法将两者结合起来以获得我想要的东西,或者我最好使用 wevtutil 简单地编写脚本?
我正在尝试将 Postfix 配置为不接受来自我自己域以外地址的出站邮件。
以下正则表达式仅成功拒绝 3 个域:
/etc/postfix/header_checks:
/(^From:.*domain\.com|^From:.*domain\.net|^From:.*domain\.co\.il)/ REJECT SEND FROM THE RIGHT DOMAINS FFS!
我想基本上扭转它并阻止除这三个之外的一切。
所以根据手册:
!/pattern/flags 结果 当模式与输入字符串不匹配时,使用对应的结果值。
但是,这只会阻止一切:
/etc/postfix/header_checks:
!/(^From:.*domain\.com|^From:.*domain\.net|^From:.*domain\.co\.il)/ REJECT SEND FROM THE RIGHT DOMAINS FFS!
我成功安装了 2 个从属服务器并将其连接到我的主服务器。问题是,两者都没有发出警报,并且两者上的 Postfix 日志都是空的。主服务器上的“Run On”选项也设置为“Slave”。我可能会错过什么?
来源:Server 2012 R2 目标:Server 2012
这是我用来导出的命令:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:apphos
tconfig="mywebsite" -dest:package=c:\test.zip,encryptPassword=password -skip:Directory= -skip:File=
以下是我在尝试导入时在 IIS 中遇到的错误:
Microsoft.Web.Deployment.DeploymentException:无法将子对象“customFields”添加到对象“logFile”。“logFile”提供程序可能不支持此部署。在 Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext) 在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position) 在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder (DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest,
我有一个相当大的 XML 文件,我需要在其中替换一些连接字符串。
我使用以下代码替换字符串:
$temp = Get-Content .\bigxmlfile.xml
$temp.replace("STRING1","STRING2") | out-file .\bigxmlfile.xml -force
这会很好地更改字符串,但由于某种原因,总是会破坏 XML。我很难弄清楚为什么。
我有一个托管在 2 台服务器上的网站。该网站基于 SSL。
我想使用本地 Opsview 监视(加载主页并查找某个字符串)每个服务器的网站。这意味着我需要转到 Opsview 的 HOSTS 文件并添加“domain.com 10.10.10.33”并每次更改它以匹配正确的服务器。我显然无法编写此脚本,因为结果很可能在检查期间出现偏差。
是否有某种适用于 Linux 的爬虫能够获取 IP 地址、域名并将它们一起工作?我尝试了 curl --proxy 和 wget --header 均无济于事。
假设我有包含以下内容的文件 temp.txt:
1
2
3
4
5
6
您将如何使用 BASH 从第 3 行开始读取文件的内容,以便输出如下所示:
3
4
5
6
我使用本指南安装了 Opsview 。问题是 REST API 不起作用。
执行:
/usr/local/nagios/bin/opsview_rest --username=admin \
--password=password GET config/host
结果是:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head>
<title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The
requested URL /rest was not found on this server.</p> <hr>
<address>Apache/2.2.15 (CentOS) Server at localhost Port 80</address>
</body></html>
Goto undefined subroutine &Carp::shortmess_real at
/usr/share/perl5/Carp.pm line 41.
我认为这个问题是由一些 Apache 设置引起的。
耳鸣问题。必须禁用 SSL-VPN。我无法在 GUI 中找到它。可能有一个 CLI 命令?
2 链接的 EX 4500 我想使用 SNMP 进行监控。
http://kb.juniper.net/InfoCenter/index?page=content&id=KB17526
谁能解释一下他是如何将“jnxOperatingDescr”翻译成“1.3.6.1.4.1.2636.3.1.13.1.5”的?
谢谢!
我试图让我们组织以外的人正确观看其中一个房间日历。
我设法使用这个powershell命令成功发布它:
Set-MailboxCalendarFolder -Identity mailbox-alias:\calendar -PublishEnabled $true (replace mailbox-alias as your user's alias)
然后我通过这个命令得到了 URL:
Get-MailboxCalendarFolder -Identity mailbox-alias:\calendar (use the information from PublishedCalendarUrl as the publish URL address)
日历是可见的,尽管我可以在没有实际信息的情况下将所有内容都视为“忙碌”。
然后我创建了一个新的共享策略并将其应用于房间日历:
但这只是行不通。一切仍然“忙碌”。
这可能是许可的事情吗?
还确保将策略设置为 CalendarSharingFreeBusyReviewer
但从外观上看,DetailLevel 是错误的:
为什么这是“仅可用性”?
此外,当我尝试更改它时,我得到“策略不允许匿名共享”......
我有一个简短的脚本,可以打印出发送给它的参数。
假设我发送“打印这个”,无论我做什么,它总是只打印出“打印”。我尝试过使用 powershell 或批处理 - 结果相同。我也尝试过测试模式,这是完全相同的问题。
有没有人遇到过这个?
用于测试的简短 powershell 脚本:
$test = $args[0]
echo "this works"
echo "I transferred $test"
exit 0
nsclient.ini 设置:
# If you want to fill this file with all avalible options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help
; Undocumented section
[/modules]
; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk = 1
; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog = 1
; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1
; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers = 1
; Check NSCP - Checkes the state of the agent
CheckNSCP = 1
; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1
; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1
; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1
; Undocumented section
[/settings/default]
; ALLOWED HOSTS - A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts = 10.50.11.164,10.50.11.130
; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/NRPE/server]
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = true
; PORT NUMBER - Port to use for NRPE.
port = 5666
[/settings/external scripts/alias]
; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
; alias_cpu_ex - Alias for alias_cpu_ex. To configure this item add a section called: /settings/external scripts/alias/alias_cpu_ex
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
; alias_disk_loose - Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable
; alias_event_log - Alias for alias_event_log. To configure this item add a section called: /settings/external scripts/alias/alias_event_log
alias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
; alias_file_age - Alias for alias_file_age. To configure this item add a section called: /settings/external scripts/alias/alias_file_age
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
; alias_file_size - Alias for alias_file_size. To configure this item add a section called: /settings/external scripts/alias/alias_file_size
alias_file_size = CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
; alias_mem - Alias for alias_mem. To configure this item add a section called: /settings/external scripts/alias/alias_mem
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
; alias_process - Alias for alias_process. To configure this item add a section called: /settings/external scripts/alias/alias_process
alias_process = checkProcState "$ARG1$=started"
; alias_process_count - Alias for alias_process_count. To configure this item add a section called: /settings/external scripts/alias/alias_process_count
alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
; alias_process_hung - Alias for alias_process_hung. To configure this item add a section called: /settings/external scripts/alias/alias_process_hung
alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"
; alias_process_stopped - Alias for alias_process_stopped. To configure this item add a section called: /settings/external scripts/alias/alias_process_stopped
alias_process_stopped = checkProcState "$ARG1$=stopped"
; alias_sched_all - Alias for alias_sched_all. To configure this item add a section called: /settings/external scripts/alias/alias_sched_all
alias_sched_all = CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
; alias_sched_long - Alias for alias_sched_long. To configure this item add a section called: /settings/external scripts/alias/alias_sched_long
alias_sched_long = CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
; alias_sched_task - Alias for alias_sched_task. To configure this item add a section called: /settings/external scripts/alias/alias_sched_task
alias_sched_task = CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0
; alias_service - Alias for alias_service. To configure this item add a section called: /settings/external scripts/alias/alias_service
alias_service = checkServiceState CheckAll
; alias_service_ex - Alias for alias_service_ex. To configure this item add a section called: /settings/external scripts/alias/alias_service_ex
alias_service_ex = checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
; alias_up - Alias for alias_up. To configure this item add a section called: /settings/external scripts/alias/alias_up
alias_up = checkUpTime MinWarn=1d MinWarn=1h
; alias_updates - Alias for alias_updates. To configure this item add a section called: /settings/external scripts/alias/alias_updates
alias_updates = check_updates -warning 0 -critical 0
; alias_volumes - Alias for alias_volumes. To configure this item add a section called: /settings/external scripts/alias/alias_volumes
alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
; alias_volumes_loose - Alias for alias_volumes_loose. To configure this item add a section called: /settings/external scripts/alias/alias_volumes_loose
alias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable
; default - Alias for default. To configure this item add a section called: /settings/external scripts/alias/default
default =
; A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments>
[/settings/external scripts/scripts]
; default - Alias for default. To configure this item add a section called: /settings/external scripts/scripts/default
default =
; shirley - Alias for shirley. To configure this item add a section called: /settings/external scripts/scripts/shirley
shirley = scripts\check_ok.bat
; sql - Alias for sql. To configure this item add a section called: /settings/external scripts/scripts/sql
sql = scripts\check_SQL.bat
; test - Alias for sql. To configure this item add a section called: /settings/external scripts/scripts/sql
test = cmd /c echo scripts\test.ps1 "$ARG1$"; exit($lastexitcode) | powershell.exe -command
; A list of wrappped scripts (ie. using the template mechanism)
[/settings/external scripts/wrapped scripts]
; A list of templates for wrapped scripts
[/settings/external scripts/wrappings]
; BATCH FILE WRAPPING -
bat = scripts\\%SCRIPT% %ARGS%
; POWERSHELL WRAPPING -
;ps1 = cmd /c echo scripts\\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
; VISUAL BASIC WRAPPING -
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%
[/settings/system/windows]
; DEFAULT LENGTH - Used to define the default intervall for range buffer checks (ie. CPU).
default buffer length = 6h
和错误信息:
$ /usr/local/nagios/libexec/check_nrpe -H 10.11.11.101 -c test -a blablabla 返回代码:3(未知)输出:不允许参数
我错过了什么?
我有2个DC。两者都是 Server 2012。
由于某种原因,组策略不会在它们之间复制,并且客户端不断获得:
The processing of Group Policy failed. Windows attempted to read the file \\domain.int\SysVol\domain.int\Policies\{F7D25262-30F3-4F13-B2FA-58122807E062}\gpt.ini
两台服务器之间的 DNS 工作正常。
我运行了 dcdiag,我看到的唯一可疑的事情是:
"DC=DomainDnsZones,DC=DOMAIN,DC=int
Latency information for 3 entries in the vector were ignored.
3 were retired Invocations. 0 were either: read-only replicas and are not verifiably latent, or dc's no longer replicating this nc. 0 had no latency information (Win2K DC). "
以下是我认为可以节省的所有信息:
PDC 进行了非授权恢复。
辅助 DC 上的 EVENTID 4004“DFS 复制服务已停止在本地路径 C:\Windows\SYSVOL\domain 处复制的文件夹上的复制”。
EVENTID 5004,但仅在 PDC 上:“DFS 复制服务成功建立了与复制组域系统卷的合作伙伴 DEV-DC 的入站连接”。
我不妨提一下,我发现 DC 之间有 7 秒的差异。这会影响什么吗?
我有 2 台 2012 年的服务器。我发现 BDC 上既没有 SYSVOL 也没有 NETLOGON 共享。
我收到了很多 5002:
The DFS Replication service encountered an error communicating with partner QA-DC for replication group Domain System Volume.
和 4614:
The DFS replication service initilizaed SYSVOL at local path c:\windows\sysvol\domain and is waiting to perform initial replication
根据本指南,我已经尝试在 BDC 上进行非授权还原和在 PDC 上进行授权还原:http: //support.microsoft.com/kb/2218556
恐怕没有帮助。
编辑:
我发现了一些奇怪的东西......查看调试日志,它看起来像是我的辅助 DC 的 dev-dc,甚至没有尝试与作为 PDC 的 QA-DC 通信。日志确实显示了这个有问题的(?)行:
“未安装或配置集群服务。跳过 VCO 轮询”。
我发现的另一件事是,在查看“DFS 管理”快照时,我发现 QA-DC 在“域系统卷”中的成员身份以某种方式被禁用......