Automatic check properties' lock routine tasks included "(ScheduledJobsDenied) in said database on a server cluster 1C 82, logging and sending test results
Version 1.01 - fixed error detection
- If the cluster added the backup process, try to connect and read database properties results in an error, it is now added in the process of checking the property Use = 1 (ie, working)
- Other defects
Once it so happened that in the properties of the combat base established flag "Block background jobs", and a very important regulation have not been met and all got on a cap. Actually then the question arose of how to do so, that would be every night of the monitor is the property and to report on the result of e-mail. We must - do it!
I must say that the idea is not new, and there are similar publications by renee
here immediately I found such options:
and that's already on the 1C, but with a very specific purpose, "on the contrary"
its users "Administrators Clastres" can be created in a cluster of servers 1C, and what would we make the necessary further actions need to be authenticated by the cluster administrator.
In a cluster of servers can be several databases, and these databases can be different users with the role of "administrator" and the need to perform a method AddAuthentication ([User database] [password database]) for each such user.
Again in the cluster can be a lot of databases and checks we need to do some ...
One way of solving this problem is to create a separate database , to register in regulation with all the checks and mailing list and never touch it. Yes, the right to life, and you can take advantage of this, but the decision in this paper is implemented on VB and vylnyaetsya Scheduled mood Average vindovyh shedullerom.
Create an object " V82.ComConnector ", rises a connection to the server cluster and perform the needed action. All steps are logged and sent to the specified e-mail addresses, and also maintains a separate log file.
All the needed methods and properties are described in the syntax assistant 1C, in the "Tools integration and administriroovaniya" - "COM-connection manager"
- create an object V82.COMConnector
- connect the cluster servers connectAgent ([connection string cluster])
- get klastrey GetClusters ()
- login as administrator cluster the Authenticate ([cluster], [admin Craster] [admin password cluster])
- receive workflows GetWorkingProcesses ([cluster])
- connect to a workflow ConnectWorkingProcess ([connection line to the working process])
- login for all administrators AddAuthentication ([ User database] [user password database] )
- get a list of databases GetInfoBases ()
- check the base property ScheduledJobsDenied
To get the properties of the information base, neodbhodimo to log in as the user of the database from the Administrator role. Poetmou it is possible to specify different options for those users that would run in a loop method workflow AddAuthentication (,), then we will be able to read the properties of all the bases.
You can specify multiple addresses to send the log of performed operations
Hierarchy parameter files
* - Required parameters
connection settings to a file server 1C
* First line: * [IP Address / Name Server Cluster Manager] * [port connection to a server cluster]
Second line: [admin cluster] [admin password cluster]
The file describes how to connect to the mail server
* First line: * [Box on whose behalf sending] * [mail server] [port unless noted the = 25]
This file contains authentication database user settings with the role of Administrator
This file contains a line with the e-mail addresses for mailing
This file contains a line with the base name to check the installed lock, if an empty file,
then checked all the bases
The result was a full mini program in VB, naturally with govnokodom inside, but worked fine. As well as an attachment the source code, which can edit by themselves.
Written on MsVS2012
All parameters are stored in a simple * .txt files, and therefore it is not a very secure. But if you have "all bad" have no access to the server, it is not very scary.
But then again, all at your discretion.
I ask criticisms and suggestions in the comments or PM.