I am very new to Zabbix and am having to navigate it for some work. I want to change when I get notified about low disk space. I have done some research and found a potential expression:
{hostname.vfs.fs.size[h;pfree].last(0)}<5.
However, I have no configuration tab in the top left corner to implement this. I cannot seem to find a place to actually push this expression into.
I have Googled the problem but have not come across a missing configuration or solution in the results :(
I am sure I am navigating it incorrectly or am doing something silly. Any advice would be greatly appreciated.
Zabbix is version 3.2
If you do not have the top "Configuration" menu, it indicates that you do not have sufficient permissions to change the trigger expression.
If you installed this instance of Zabbix, log in as the default "Admin" user. If somebody else installed it, contact that person to obtain the needed permissions or make the configuration changes.
Related
I'm just doing some web, but sometimes, when I want to debug, the whole web is out of date. I've already read some threads here, but the problem is I set it to "When out of date, prompt to launch". It doesn't say anything, it just start the browser and do its job.
Could you please help me?
Thanks.
If you use the build option
“Prompt to build”:Displays the message box every time that a project configuration is out of date.
Like this document here:
https://msdn.microsoft.com/en-us/library/cyhcc7zc.aspx?f=255&MSPPError=-2147217396
It is used for the VC++ project only.
I am using PHPStorm 9.
I have installed PHPCS to sniff my code. It is properly configured, up and running.
I am working on a very old project, which was implemented in plain PHP, and not using any code standard.
As a result, every time I open any of those files, I get a message at the top of the screen saying that I have too many errors (code style errors).
I have a couple of problems with that.
First, I already know how bad the code is, so I don't need PHP Storm to tell me that all the time.
Second. That message appears and disappears every time I edit the code. As a result, the window editor is constantly moving up and down, which I find specially annoying.
Also, at the top of the screen it is showing me the breadcrumbs, to tell me where I am. I appreciate the help, but I don't actually need it.
So the question is, how can I configure the IDE to disable those two messages? (read arrow and orange arrow in the attached image).
Please notice that I don't want to disable PHPCS. I only want to turn off those annoying messages.
I was unable to find it out by myself because I don't even know how those messages are called. Certainly not 'popups', nor 'status bar'
Best regards
Nicolas
Answering my own questions, thanks to the help of the PHPStorm Support team, Vladimir Luchansky (perhaps you need to create an account to see the thread):
To disable breadcrumbs: Go to File->Settings->Editor->General->Appearance, and untick the option Show HTML Breadcrumbs. Then restart the IDE
To disable the PHPCS messages without disabling PHPCS itself: Well, that option is not available in PHPStorm 9. It will be available for a future release. According to Vladimir, a developer is working on it. In order to make this request to go up in the future request list, the request needs to get as much 'votes' as possible. So, if you are interested in this feature to be ready ASAP, please vote up here.
Best,
Nicolas
I don't believe there's any mechanism for suppressing those phpcs: Too many messages per file alerts. As an alternative solution, you could give this work-around a try:
Clone your current inspection profile via Preferences > Editor > Inspections. Name the new one "Strict (with phpcs)". Then, choose your old inspection profile from the Profile: dropdown box (thus, reverting your project's default inspection profile to your old one). Rename it to "Weak (without phpcs)" and disable phpcs for that particular profile by unchecking the PHP > PHP Code Sniffer validation option.
From this point forward, phpcs inspections (and related alerts, like the one you're concerned about) won't come into play as you're editing your files. However, whenever you do want to inspect one of your files using PHP Code Sniffer, you can do so easily via Code > Inspect Code > Inspection Profile > Strict (with phpcs)
Hope this helps!
Say I use SourceGear Vault client on my desktop at work and check out a few files to a network folder. But when I am working from home and login to a terminal server (Windows RDP), Vault thinks that someone else has checked out the files and so I can't access/edit them.
Is there a way to set things up such I can checkout a file to a common network location and keep working on it from multiple machines?
Thanks
What you are seeing is normal, because the Vault cache is specific to each client.
Here are the options I could see for how to deal with this:
1) The best way is to shelve your code changes. Then you can pull your shelved changes down when you get home and continue where you left off. If you need to check in from home, then when you initially shelve your changes, you should also undo your check out so that you can check out again from home.
2) You could use a network location for yourself, but you are likely to run into the same situation when you go to check in. What this would give you is just the ability to have only one location for the code you are editing. Also, some of the statuses you see as you are switching between clients won't look right. You still would get best results by undoing your check out before leaving work, but in this case, you'd choose the option to leave your changes instead of reverting them back.
3) You can perform an additional check in. That way your code is in Vault. Then you can check it out again and continue from where you left off. Some places don't want partially completed code checked in though, so you will have to decide if this is in line with your workplace requirements.
4) You could perform a non-exclusive check out. That way you can check out twice. You will get a warning, but it will still allow you to continue. To get your changes from your work computer, you still will be well served by using Shelve.
Feel free to email me at support#sourcegear.com if you need additional help.
Thanks,
Beth Kieler
Technical Support
SourceGear LLC
I just got a mail saying that I have to change a config value at 2009-09-01 (new taxes). Our normal approach for this would be to to awake at 2009-08-31 at 23:59 and then just change the value manually. Which not is a big problem since this don't happens to often. But it makes me wonder how other people handle issues like this.
So! How do you handle date specific config changes?
(We are working in asp.net but I don't think this has to be language specific)
Br
Carl Bergquist
I'd normally store this kind of data in a database table like this
Key, Value, EffectiveFrom, EffectiveTo
-----------------------------------------
VAT, 15.0, 20081201, 20091231
VAT, 17.5, 20100101, NULL
I'd then use the EffectiveFrom and EffectiveTo dates to chose the value that is effective at the given time. If the rate is open ended then the effecive to could either by NULL or 99991231.
This also allows you to go back without having to change the config. E.g. if someone asks you to recalculate the tax for the previous month before the rate change.
In linux, there is a command "at" for batch execution.
See "man at" for details.
To be honest, waking up near the time and changing it seems to be the simplest and cheapest approach. All of the technical solutions are fine, but it depends where you work.
In our environment it would be cheaper and simpler to get someone to wake up and make the change than to redevelop the functionality of a piece of software that already works. It certainly involves less testing, development overhead and costs which means we would tend to solve the problem as you do, manually.
That depends totally on the situation and the technology.
pjp's idea is good, if you get your config from a database, or as metadata to define the valid time for whole config sets/files.
Another might be: just prepare a new configfile with the new entries and swap them at midnight (probably with a restart of the service/program) whatever.
Swapping them would be possible with at (as given bei Neeraj) ...
If timing is a problem you should handle the change, or at least the timing of the change on the running server (to avoid time out of synch problems).
We got same kind of problem some time before and handled using the following approach.
this is suitable if you are well known to the source that orginates the configuration changes..
In our case, the source exposed a webservice (actualy a third party) which will return a modified config details. And there is a windows service running on our server which keeps on polling the webservice and will update the configuration file if there is any change.
this works perfectly in our case..
You can make use of this approach by changing the polling webservice part to your source of config change (say reading changes from some disk path). But am not sure how this is possible reading config changes from email.
Why not just make a shell script to swap out the files. run it in cron and switch the files out a minute before and send an alert text if NOT successful and an email if successful.
This is an example on a Linux box but I think you get the point and can do this on a Windows box.
Script:
cp /path/to/old/config /path/to/backup/dir/config.timestamp
cp /path/to/new/config
if(/path/to/new/config exsits) {
sendSuccessEmail();
} else {
sendPanicTextAlert();
}
cron:
59 23 31 8 * /path/to/script.sh
you could test this as well before hand just point to some dummy directories and file
I've seen the hybrid approach. Instead of actually changing the data model to include EffectiveDate/EndDate or manually changing the values yourself, schedule a script to change the values automatically. Also, be sure to have a solid test plan that will validate all changes.
However, this type of manual change can have a dramatic impact on reporting. If previous transactions join directly to the tables being changed, numbers in historical reports could change in a very bad way. There really is no "right" answer.
If I'm not able to do something like pjp's solution, I'd use either a scheduled task or a server job to update it automatically at the right time.
But...I'd probably still be awake checking it had worked.
Look the best solution would be to parameterise your config file and add things like when a certain entry should be used from. This would negate the need for any copying or swapping of files and your application would simply deal with it. (That goes for a config file approach or a database)
If you cannot change the current systems and you have to go with swapping the config files, then you also have two options:
Use a scheduled task to kick off a batch job or even a VBScript or PowerShell script (which ever you feel comfortable with) Make sure you set up the correct credentials to be able to do this at the middle of the night and you could also add some checking and mitigation into this approach.
Write a windows Service that does this for you. Here you have all the flexibility you need. Code it to do whatever it needs to do, do all the checks you need to (so that you can keep sleeping rather than making sure it actually worked) etc, etc. You service would then even take care of the scheduling aspect and all will be good. Here you could use xml DOM object and xPath and not replace the file, but simply update the specific entries as required.
Remember that any change to the config file would cause your site to restart, so make sure you take care of all the other housekeeping stuff that this could cause. (Although this would be exactly the same if you where sitting there in the middle of the night copying file around)
In a Win32 environment, you can use the GetLastInputInfo API call in Microsoft documentation. Basically, this method returns the last tick that corresponds with when the user last provided input, and you have to compare that to the current tick to determine how long ago that was.
Xavi23cr has a good example for C# at codeproject.
Any suggestions for other environments?
As for Linux, I know that Pidgin has to determine idle time to change your status to away after a certain amount of time. You might open the source and see if you can find the code that does what you need it to do.
You seem to have answered your own question there Nathan ;-)
"GetLastInputInfo" is the way to go.
One trick is that if your application is running on the desktop, and the user connects to a virtual machine, then GetLastInputInfo will report no activity (since there is no activity on the host machine).
This can be different to the behaviour you want, depending on how you wish to apply the user input.